Browse Source

fix(nocohub): Moved CreateUserDto from auth controller to service

pull/6376/head
Muhammed Mustafa 1 year ago
parent
commit
9dff0934bc
  1. 6
      packages/nocodb/src/controllers/auth/auth.controller.ts
  2. 7
      packages/nocodb/src/services/auth.service.ts

6
packages/nocodb/src/controllers/auth/auth.controller.ts

@ -24,12 +24,6 @@ import { NcError } from '~/helpers/catchError';
import { Acl } from '~/middlewares/extract-ids/extract-ids.middleware';
import { User } from '~/models';
export class CreateUserDto {
readonly username: string;
readonly email: string;
readonly password: string;
}
@Controller()
export class AuthController {
constructor(

7
packages/nocodb/src/services/auth.service.ts

@ -4,11 +4,16 @@ import { Injectable } from '@nestjs/common';
import * as bcrypt from 'bcryptjs';
import { v4 as uuidv4 } from 'uuid';
import type { CreateUserDto } from '~/controllers/auth/auth.controller';
import Noco from '~/Noco';
import { genJwt } from '~/services/users/helpers';
import { UsersService } from '~/services/users/users.service';
export class CreateUserDto {
readonly username: string;
readonly email: string;
readonly password: string;
}
@Injectable()
export class AuthService {
constructor(private usersService: UsersService) {}

Loading…
Cancel
Save