feat: added OauthCallback schema validation

This commit is contained in:
원더 2021-01-27 16:47:11 +09:00
parent 19a6bd8826
commit 0fed5b9b32

View File

@ -22,8 +22,6 @@ export const ImageOptionsSchema: Yup.SchemaOf<ImageOptions> = Yup.object({
size: Yup.mixed<ImageSize>().oneOf(['128', '256', '512']).required() size: Yup.mixed<ImageSize>().oneOf(['128', '256', '512']).required()
}) })
export const PageCount = Yup.number().integer().positive()
interface ImageOptions { interface ImageOptions {
id: string id: string
ext: ext ext: ext
@ -33,5 +31,15 @@ interface ImageOptions {
type ext = 'webp' | 'png' | 'gif' type ext = 'webp' | 'png' | 'gif'
type ImageSize = '128' | '256' | '512' 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 export default Yup