This commit is contained in:
@ -37,7 +37,7 @@ V1.post("/db/:database/query", async (ctx) => {
|
||||
}
|
||||
|
||||
if (authkey && db.publickey) {
|
||||
let res = await verifyJWT(authkey, db.publickey);
|
||||
let res = await verifyJWT(authkey as string, db.publickey);
|
||||
if (res && !res.uid && res.user) res.uid = res.user;
|
||||
if (!res || !res.uid) {
|
||||
throw new BadRequestError("Invalid JWT");
|
||||
|
Reference in New Issue
Block a user