From 9dff0934bc4069b0b58ba5ab5e5caee93c2c3d2a Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Tue, 19 Sep 2023 07:45:20 +0000 Subject: [PATCH] fix(nocohub): Moved CreateUserDto from auth controller to service --- packages/nocodb/src/controllers/auth/auth.controller.ts | 6 ------ packages/nocodb/src/services/auth.service.ts | 7 ++++++- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/packages/nocodb/src/controllers/auth/auth.controller.ts b/packages/nocodb/src/controllers/auth/auth.controller.ts index 5a1b869856..8912b31739 100644 --- a/packages/nocodb/src/controllers/auth/auth.controller.ts +++ b/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( diff --git a/packages/nocodb/src/services/auth.service.ts b/packages/nocodb/src/services/auth.service.ts index 14f20239f8..96e03bfedb 100644 --- a/packages/nocodb/src/services/auth.service.ts +++ b/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) {}