mirror of
https://github.com/koreanbots/core.git
synced 2025-12-15 14:10:22 +00:00
chore: added put
This commit is contained in:
parent
98adfabc5d
commit
bee9330a0e
@ -206,7 +206,7 @@ async function assignToken(info: TokenRegister):Promise<string> {
|
||||
}
|
||||
|
||||
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 ?? '' })
|
||||
if(user.length === 0) return false
|
||||
else return user[0].id
|
||||
@ -293,6 +293,10 @@ export const update = {
|
||||
assignToken
|
||||
}
|
||||
|
||||
export const put = {
|
||||
|
||||
}
|
||||
|
||||
export const ratelimit = {
|
||||
image: (ip: string) => {
|
||||
addRequest(ip, imageRateLimit)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user