Browse Source

fix: Delete token from memory

Deleting token from memory after api token from database

fix #291

Signed-off-by: Pranav C Balan <pranavxc@gmail.com>
pull/293/head
Pranav C Balan 3 years ago
parent
commit
9743d59d5e
  1. 6
      packages/nocodb/src/lib/noco/meta/NcMetaMgr.ts

6
packages/nocodb/src/lib/noco/meta/NcMetaMgr.ts

@ -31,12 +31,12 @@ import isDocker from 'is-docker';
import slash from 'slash';
import RestAuthCtrl from "../rest/RestAuthCtrlEE";
import ExpressXcTsRoutesHm from "../../sqlMgr/code/routes/xc-ts/ExpressXcTsRoutesHm";
import ExpressXcTsRoutesBt from "../../sqlMgr/code/routes/xc-ts/ExpressXcTsRoutesBt";
import ExpressXcTsRoutes from "../../sqlMgr/code/routes/xc-ts/ExpressXcTsRoutes";
import NcPluginMgr from "../plugins/NcPluginMgr";
const XC_PLUGIN_DET = 'XC_PLUGIN_DET';
@ -3072,7 +3072,9 @@ export default class NcMetaMgr {
protected async xcApiTokenDelete(args): Promise<any> {
Tele.emit('evt', {evt_type: 'apiToken:deleted'});
return this.xcMeta.metaDelete(null, null, 'nc_api_tokens', args.args.id);
const res = await this.xcMeta.metaDelete(null, null, 'nc_api_tokens', args.args.id);
await RestAuthCtrl.instance.loadLatestApiTokens();
return res;
}

Loading…
Cancel
Save