Browse Source

Correct parameter in delete token

pull/4681/head
Vijay Rathore 2 years ago committed by GitHub
parent
commit
f51458b73b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      packages/nocodb/src/lib/meta/api/apiTokenApis.ts

2
packages/nocodb/src/lib/meta/api/apiTokenApis.ts

@ -14,7 +14,7 @@ export async function apiTokenCreate(req: Request, res: Response) {
res.json(await ApiToken.insert({ ...req.body, fk_user_id: req['user'].id })); res.json(await ApiToken.insert({ ...req.body, fk_user_id: req['user'].id }));
} }
export async function apiTokenDelete(req: Request, res: Response) { export async function apiTokenDelete(req: Request, res: Response) {
const apiToken = await ApiToken.getByToken(req.params.apiTokenId); const apiToken = await ApiToken.getByToken(req.params.token);
if ( if (
!req['user'].roles.includes(OrgUserRoles.SUPER_ADMIN) && !req['user'].roles.includes(OrgUserRoles.SUPER_ADMIN) &&
apiToken.fk_user_id !== req['user'].id apiToken.fk_user_id !== req['user'].id

Loading…
Cancel
Save