mirror of
https://github.com/ArthurDanjou/artdanj-shortener.git
synced 2026-01-14 18:59:56 +01:00
21 lines
503 B
TypeScript
Executable File
21 lines
503 B
TypeScript
Executable File
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
|
import {schema} from '@ioc:Adonis/Core/Validator'
|
|
|
|
export default class LinkUpdateValidator {
|
|
constructor (protected ctx: HttpContextContract) {}
|
|
|
|
public schema = schema.create({
|
|
target: schema.string.optional({
|
|
trim: true
|
|
}),
|
|
type: schema.enum.optional(
|
|
['TEMPORARY', 'PERMANENT'] as const
|
|
),
|
|
expire: schema.date.optional({
|
|
format: 'yyyy-MM-dd HH:mm:ss',
|
|
})
|
|
})
|
|
|
|
public messages = {}
|
|
}
|