Browse Source

refactor(nocodb): adopt getList new format in ProjectUser.ts

pull/5430/head
Wing-Kam Wong 2 years ago
parent
commit
232b58e797
  1. 6
      packages/nocodb/src/lib/models/ProjectUser.ts

6
packages/nocodb/src/lib/models/ProjectUser.ts

@ -187,10 +187,12 @@ export default class ProjectUser {
}
// remove project from user project list cache
let cachedProjectList = await NocoCache.getList(CacheScope.USER_PROJECT, [
const cachedList = await NocoCache.getList(CacheScope.USER_PROJECT, [
userId,
]);
if (cachedProjectList?.length) {
let { list: cachedProjectList } = cachedList;
const { isEmptyList } = cachedList;
if (!isEmptyList && cachedProjectList?.length) {
cachedProjectList = cachedProjectList.filter((p) => p.id !== projectId);
await NocoCache.setList(
CacheScope.USER_PROJECT,

Loading…
Cancel
Save