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. 4
      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 { OrgUserRoles } from '../../../enums/OrgUserRoles';
import User from '../../models/User'; import User from '../../models/User';
import { metaApiMetrics } from '../helpers/apiMetrics'; import { metaApiMetrics } from '../helpers/apiMetrics';
import { NcError } from '../helpers/catchError';
import { extractProps } from '../helpers/extractProps'; import { extractProps } from '../helpers/extractProps';
import ncMetaAclMw from '../helpers/ncMetaAclMw'; import ncMetaAclMw from '../helpers/ncMetaAclMw';
import { PagedResponseImpl } from '../helpers/PagedResponse'; import { PagedResponseImpl } from '../helpers/PagedResponse';
@ -37,8 +38,8 @@ async function userDelete(req, res) {
res.json(await User.delete(req.params.userId)); 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 }); const router = Router({ mergeParams: true });

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

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

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

@ -1,5 +1,5 @@
import { UserType } from 'nocodb-sdk'; 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 { CacheGetType, CacheScope, MetaTable } from '../utils/globals';
import Noco from '../Noco'; import Noco from '../Noco';
import { extractProps } from '../meta/helpers/extractProps'; import { extractProps } from '../meta/helpers/extractProps';
@ -228,6 +228,6 @@ export default class User implements UserType {
} }
static async delete(_userId: string) { static async delete(_userId: string) {
NcError.notImplemented() NcError.notImplemented();
} }
} }

Loading…
Cancel
Save