chore: added put

This commit is contained in:
Junseo Park 2021-02-17 15:15:48 +09:00
parent 98adfabc5d
commit bee9330a0e

View File

@ -206,7 +206,7 @@ async function assignToken(info: TokenRegister):Promise<string> {
} }
async function Authorization(token: string):Promise<string|false> { async function Authorization(token: string):Promise<string|false> {
const tokenInfo = verify(token) const tokenInfo = verify(token ?? '')
const user = await knex('users').select(['id']).where({ id: tokenInfo?.id ?? '', token: token ?? '' }) const user = await knex('users').select(['id']).where({ id: tokenInfo?.id ?? '', token: token ?? '' })
if(user.length === 0) return false if(user.length === 0) return false
else return user[0].id else return user[0].id
@ -293,6 +293,10 @@ export const update = {
assignToken assignToken
} }
export const put = {
}
export const ratelimit = { export const ratelimit = {
image: (ip: string) => { image: (ip: string) => {
addRequest(ip, imageRateLimit) addRequest(ip, imageRateLimit)