mirror of
https://github.com/koreanbots/core.git
synced 2025-12-16 14:30:22 +00:00
types: fixed type overwrite
This commit is contained in:
parent
fd010b0aac
commit
68e1bd1bf6
@ -18,7 +18,7 @@ const Avatar = nc<ApiRequest, NextApiResponse>()
|
|||||||
const img = await get.images.user.load(DiscordEnpoints.CDN.default(Math.floor(Math.random() * 6), { format: 'png' }))
|
const img = await get.images.user.load(DiscordEnpoints.CDN.default(Math.floor(Math.random() * 6), { format: 'png' }))
|
||||||
res.setHeader('Content-Type', 'image/png')
|
res.setHeader('Content-Type', 'image/png')
|
||||||
res.setHeader('Cache-Control', 'no-cache')
|
res.setHeader('Cache-Control', 'no-cache')
|
||||||
img.pipe(res)
|
img.pipe(res as unknown as NodeJS.WritableStream)
|
||||||
} })
|
} })
|
||||||
if(ratelimited) return
|
if(ratelimited) return
|
||||||
const splitted = param.split('.')
|
const splitted = param.split('.')
|
||||||
@ -42,7 +42,7 @@ const Avatar = nc<ApiRequest, NextApiResponse>()
|
|||||||
|
|
||||||
res.setHeader('Content-Type', `image/${ext}`)
|
res.setHeader('Content-Type', `image/${ext}`)
|
||||||
res.setHeader('Cache-Control', 'public, max-age=86400')
|
res.setHeader('Cache-Control', 'public, max-age=86400')
|
||||||
img.pipe(res)
|
img.pipe(res as unknown as NodeJS.WritableStream)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user