Browse Source

fix(api): typo correction

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/4134/head
Pranav C 2 years ago
parent
commit
65c0a6f092
  1. 5
      packages/nocodb/src/lib/meta/api/orgUserApis.ts
  2. 2
      packages/nocodb/src/lib/meta/helpers/ncMetaAclMw.ts
  3. 6
      packages/nocodb/src/lib/models/User.ts

5
packages/nocodb/src/lib/meta/api/orgUserApis.ts

@ -2,6 +2,7 @@ import { Router } from 'express';
import { OrgUserRoles } from '../../../enums/OrgUserRoles';
import User from '../../models/User';
import { metaApiMetrics } from '../helpers/apiMetrics';
import { NcError } from '../helpers/catchError';
import { extractProps } from '../helpers/extractProps';
import ncMetaAclMw from '../helpers/ncMetaAclMw';
import { PagedResponseImpl } from '../helpers/PagedResponse';
@ -37,8 +38,8 @@ async function userDelete(req, res) {
res.json(await User.delete(req.params.userId));
}
async function userAdd(req, res) {
async function userAdd(_req, _res) {
NcError.notImplemented();
}
const router = Router({ mergeParams: true });

2
packages/nocodb/src/lib/meta/helpers/ncMetaAclMw.ts

@ -21,7 +21,7 @@ export default function (
roles?.editor ||
roles?.viewer ||
roles?.commenter ||
roles?.[OrgUserRoles.SUPER] ||a
roles?.[OrgUserRoles.SUPER] ||
roles?.[OrgUserRoles.CREATOR] ||
roles?.[OrgUserRoles.VIEWER]
)

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

@ -1,5 +1,5 @@
import { UserType } from 'nocodb-sdk';
import { NcError } from '../meta/helpers/catchError'
import { NcError } from '../meta/helpers/catchError';
import { CacheGetType, CacheScope, MetaTable } from '../utils/globals';
import Noco from '../Noco';
import { extractProps } from '../meta/helpers/extractProps';
@ -227,7 +227,7 @@ export default class User implements UserType {
await ncMeta.metaDelete(null, null, MetaTable.USERS, userId);
}
static async delete(_userId:string) {
NcError.notImplemented()
static async delete(_userId: string) {
NcError.notImplemented();
}
}

Loading…
Cancel
Save