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:
@@ -2,7 +2,7 @@ import vine, { SimpleMessagesProvider } from '@vinejs/vine';
|
||||
import { Visibility } from '../enums/visibility.js';
|
||||
|
||||
const params = vine.object({
|
||||
id: vine.string().trim(),
|
||||
id: vine.number(),
|
||||
});
|
||||
|
||||
export const createCollectionValidator = vine.compile(
|
||||
@@ -10,7 +10,7 @@ export const createCollectionValidator = vine.compile(
|
||||
name: vine.string().trim().minLength(1).maxLength(254),
|
||||
description: vine.string().trim().maxLength(254).nullable(),
|
||||
visibility: vine.enum(Visibility),
|
||||
nextId: vine.string().optional(),
|
||||
nextId: vine.number(),
|
||||
})
|
||||
);
|
||||
|
||||
@@ -19,7 +19,7 @@ export const updateCollectionValidator = vine.compile(
|
||||
name: vine.string().trim().minLength(1).maxLength(254),
|
||||
description: vine.string().trim().maxLength(254).nullable(),
|
||||
visibility: vine.enum(Visibility),
|
||||
nextId: vine.string().optional(),
|
||||
nextId: vine.number(),
|
||||
|
||||
params,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user