mirror of
https://github.com/koreanbots/core.git
synced 2025-12-16 06:20:24 +00:00
feat: added OauthCallback schema validation
This commit is contained in:
parent
19a6bd8826
commit
0fed5b9b32
12
utils/Yup.ts
12
utils/Yup.ts
@ -22,8 +22,6 @@ export const ImageOptionsSchema: Yup.SchemaOf<ImageOptions> = Yup.object({
|
||||
size: Yup.mixed<ImageSize>().oneOf(['128', '256', '512']).required()
|
||||
})
|
||||
|
||||
export const PageCount = Yup.number().integer().positive()
|
||||
|
||||
interface ImageOptions {
|
||||
id: string
|
||||
ext: ext
|
||||
@ -33,5 +31,15 @@ interface ImageOptions {
|
||||
type ext = 'webp' | 'png' | 'gif'
|
||||
type ImageSize = '128' | '256' | '512'
|
||||
|
||||
export const PageCount = Yup.number().integer().positive()
|
||||
|
||||
export const OauthCallbackSchema: Yup.SchemaOf<OauthCallback> = Yup.object({
|
||||
code: Yup.string().required()
|
||||
})
|
||||
|
||||
interface OauthCallback {
|
||||
code: string
|
||||
}
|
||||
|
||||
|
||||
export default Yup
|
||||
Loading…
x
Reference in New Issue
Block a user