Browse Source

refactor: type correction

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5764/head
Pranav C 2 years ago
parent
commit
268d8367b7
  1. 2
      packages/nocodb-sdk/src/lib/Api.ts
  2. 2
      packages/nocodb/src/controllers/users/users.controller.ts
  3. 4
      packages/nocodb/src/schema/swagger.json
  4. 2
      packages/nocodb/src/services/users/users.service.ts

2
packages/nocodb-sdk/src/lib/Api.ts

@ -2255,6 +2255,8 @@ export interface UserType {
* @example org-level-viewer
*/
roles?: string;
/** Access token version */
token_version?: string;
}
/**

2
packages/nocodb/src/controllers/users/users.controller.ts

@ -220,7 +220,7 @@ export class UsersController {
if (!userId) return;
const user: any = await User.get(userId);
const user = await User.get(userId);
if (!user) return;

4
packages/nocodb/src/schema/swagger.json

@ -20000,6 +20000,10 @@
"description": "The roles of the user",
"example": "org-level-viewer",
"type": "string"
},
"token_version": {
"description": "Access token version",
"type": "string"
}
},
"required": ["email", "email_verified", "firstname", "id", "lastname"],

2
packages/nocodb/src/services/users/users.service.ts

@ -486,7 +486,7 @@ export class UsersService {
return this.login(user);
}
login(user: any) {
login(user: UserType) {
return {
token: genJwt(user, Noco.getConfig()),
};

Loading…
Cancel
Save