mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-09 23:15:36 +00:00
feat: add delete link form and controller
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
import vine from '@vinejs/vine';
|
||||
|
||||
const params = vine.object({
|
||||
id: vine.string().trim(),
|
||||
});
|
||||
|
||||
export const createLinkValidator = vine.compile(
|
||||
vine.object({
|
||||
name: vine.string().trim().minLength(1).maxLength(254),
|
||||
@@ -18,9 +22,13 @@ export const updateLinkValidator = vine.compile(
|
||||
favorite: vine.boolean(),
|
||||
collectionId: vine.string().trim(),
|
||||
|
||||
params: vine.object({
|
||||
id: vine.string().trim(),
|
||||
}),
|
||||
params,
|
||||
})
|
||||
);
|
||||
|
||||
export const deleteLinkValidator = vine.compile(
|
||||
vine.object({
|
||||
params,
|
||||
})
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user