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