mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-09 23:15:36 +00:00
refactor: controllers and models to adapt them to the previous version of my-links
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import vine from '@vinejs/vine';
|
||||
|
||||
const params = vine.object({
|
||||
id: vine.string().trim(),
|
||||
id: vine.number(),
|
||||
});
|
||||
|
||||
export const createLinkValidator = vine.compile(
|
||||
@@ -10,7 +10,7 @@ export const createLinkValidator = vine.compile(
|
||||
description: vine.string().trim().maxLength(300).optional(),
|
||||
url: vine.string().trim(),
|
||||
favorite: vine.boolean(),
|
||||
collectionId: vine.string().trim(),
|
||||
collectionId: vine.number(),
|
||||
})
|
||||
);
|
||||
|
||||
@@ -20,7 +20,7 @@ export const updateLinkValidator = vine.compile(
|
||||
description: vine.string().trim().maxLength(300).optional(),
|
||||
url: vine.string().trim(),
|
||||
favorite: vine.boolean(),
|
||||
collectionId: vine.string().trim(),
|
||||
collectionId: vine.number(),
|
||||
|
||||
params,
|
||||
})
|
||||
@@ -37,7 +37,7 @@ export const updateLinkFavoriteStatusValidator = vine.compile(
|
||||
favorite: vine.boolean(),
|
||||
|
||||
params: vine.object({
|
||||
id: vine.string().trim(),
|
||||
id: vine.number(),
|
||||
}),
|
||||
})
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user