Making uid more compatible
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@ -38,6 +38,7 @@ V1.post("/db/:database/query", async (ctx) => {
|
||||
|
||||
if (authkey && db.publickey) {
|
||||
let res = await verifyJWT(authkey, db.publickey);
|
||||
if (res && !res.uid && res.user) res.uid = res.user;
|
||||
if (!res || !res.uid) {
|
||||
throw new BadRequestError("Invalid JWT");
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user