Browse Source

refactor(nocodb): lint

pull/5430/head
Wing-Kam Wong 2 years ago
parent
commit
c1ee8d9dd2
  1. 7
      packages/nocodb/src/lib/models/ModelRoleVisibility.ts
  2. 6
      packages/nocodb/src/lib/models/View.ts

7
packages/nocodb/src/lib/models/ModelRoleVisibility.ts

@ -24,9 +24,10 @@ export default class ModelRoleVisibility implements ModelRoleVisibilityType {
} }
static async list(projectId): Promise<ModelRoleVisibility[]> { static async list(projectId): Promise<ModelRoleVisibility[]> {
const cachedList = await NocoCache.getList(CacheScope.MODEL_ROLE_VISIBILITY, [ const cachedList = await NocoCache.getList(
projectId, CacheScope.MODEL_ROLE_VISIBILITY,
]); [projectId]
);
let { list: data } = cachedList; let { list: data } = cachedList;
const { isEmptyList } = cachedList; const { isEmptyList } = cachedList;
if (!isEmptyList && !data.length) { if (!isEmptyList && !data.length) {

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

@ -1126,7 +1126,7 @@ export default class View implements ViewType {
// get existing cache // get existing cache
const cachedList = await NocoCache.getList(scope, [viewId]); const cachedList = await NocoCache.getList(scope, [viewId]);
let { list: dataList } = cachedList; const { list: dataList } = cachedList;
const { isEmptyList } = cachedList; const { isEmptyList } = cachedList;
if (!isEmptyList && dataList?.length) { if (!isEmptyList && dataList?.length) {
for (const o of dataList) { for (const o of dataList) {
@ -1214,7 +1214,7 @@ export default class View implements ViewType {
// get existing cache // get existing cache
const cachedList = await NocoCache.getList(scope, [viewId]); const cachedList = await NocoCache.getList(scope, [viewId]);
let { list: dataList } = cachedList; const { list: dataList } = cachedList;
const { isEmptyList } = cachedList; const { isEmptyList } = cachedList;
const colsEssentialForView = const colsEssentialForView =
@ -1263,7 +1263,7 @@ export default class View implements ViewType {
} }
static async shareViewList(tableId, ncMeta = Noco.ncMeta) { static async shareViewList(tableId, ncMeta = Noco.ncMeta) {
let cachedList = await NocoCache.getList(CacheScope.VIEW, [tableId]); const cachedList = await NocoCache.getList(CacheScope.VIEW, [tableId]);
let { list: sharedViews } = cachedList; let { list: sharedViews } = cachedList;
const { isEmptyList } = cachedList; const { isEmptyList } = cachedList;
if (!isEmptyList && !sharedViews.length) { if (!isEmptyList && !sharedViews.length) {

Loading…
Cancel
Save