move code to workspaceUser service

This commit is contained in:
Philipinho
2024-03-03 17:40:10 +00:00
parent 7afd893fa1
commit bfebfb27a9
6 changed files with 232 additions and 165 deletions

View File

@ -10,7 +10,6 @@ import { UserRepository } from './repositories/user.repository';
import { plainToInstance } from 'class-transformer';
import * as bcrypt from 'bcrypt';
import { WorkspaceService } from '../workspace/services/workspace.service';
import { Workspace } from '../workspace/entities/workspace.entity';
import { DataSource, EntityManager } from 'typeorm';
import { transactionWrapper } from '../../helpers/db.helper';
import { CreateWorkspaceDto } from '../workspace/dto/create-workspace.dto';
@ -61,7 +60,10 @@ export class UserService {
}
async getUserInstance(userId: string) {
console.log('what is')
const user: User = await this.findById(userId);
console.log('what one')
if (!user) {
throw new NotFoundException('User not found');