types: fixed size type

This commit is contained in:
원더 2021-01-24 22:43:53 +09:00
parent 2cb83c499c
commit 92c7bb4bef

View File

@ -6,7 +6,6 @@ import { DiscordEnpoints } from '@utils/Constants'
import { get, ratelimit } from '@utils/Query' import { get, ratelimit } from '@utils/Query'
import RateLimitHandler from '@utils/RateLimitHandler' import RateLimitHandler from '@utils/RateLimitHandler'
import { ImageOptionsSchema } from '@utils/Yup' import { ImageOptionsSchema } from '@utils/Yup'
import { ImageSize } from '@types'
const Avatar = nc<ApiRequest, NextApiResponse>() const Avatar = nc<ApiRequest, NextApiResponse>()
.get(async(req, res) => { .get(async(req, res) => {
@ -49,10 +48,8 @@ const Avatar = nc<ApiRequest, NextApiResponse>()
interface ApiRequest extends NextApiRequest { interface ApiRequest extends NextApiRequest {
query: { query: {
id: string id: string
size?: ImageSize size?: '128' | '256' | '512'
} }
} }
type Ext = 'webp' | 'png' | 'gif'
export default Avatar export default Avatar