From 72b3a9dc93e0b0a8f77781d24dd2095c8ba2dcb0 Mon Sep 17 00:00:00 2001 From: Bastian Wagner Date: Fri, 31 Jul 2026 21:38:58 +0200 Subject: [PATCH] files --- myteamwallet_backend/src/auth/dto/auth-update.dto.ts | 7 ------- myteamwallet_backend/src/users/dto/create-user.dto.ts | 8 -------- myteamwallet_backend/src/users/dto/update-user.dto.ts | 8 -------- myteamwallet_backend/src/users/entities/user.entity.ts | 6 ------ 4 files changed, 29 deletions(-) diff --git a/myteamwallet_backend/src/auth/dto/auth-update.dto.ts b/myteamwallet_backend/src/auth/dto/auth-update.dto.ts index 1efe37f..a75dcdb 100644 --- a/myteamwallet_backend/src/auth/dto/auth-update.dto.ts +++ b/myteamwallet_backend/src/auth/dto/auth-update.dto.ts @@ -1,15 +1,8 @@ import { ApiProperty } from '@nestjs/swagger'; import { IsNotEmpty, IsOptional, MinLength, Validate } from 'class-validator'; import { IsExist } from '../../utils/validators/is-exists.validator'; -import { FileEntity } from '../../files/entities/file.entity'; export class AuthUpdateDto { - @ApiProperty({ type: () => FileEntity }) - @IsOptional() - @Validate(IsExist, ['FileEntity', 'id'], { - message: 'imageNotExists', - }) - photo?: FileEntity; @ApiProperty({ example: 'John' }) @IsOptional() diff --git a/myteamwallet_backend/src/users/dto/create-user.dto.ts b/myteamwallet_backend/src/users/dto/create-user.dto.ts index c208f8f..94b4819 100644 --- a/myteamwallet_backend/src/users/dto/create-user.dto.ts +++ b/myteamwallet_backend/src/users/dto/create-user.dto.ts @@ -10,7 +10,6 @@ import { } from 'class-validator'; import { Status } from '../../statuses/entities/status.entity'; import { IsNotExist } from '../../utils/validators/is-not-exists.validator'; -import { FileEntity } from '../../files/entities/file.entity'; import { IsExist } from '../../utils/validators/is-exists.validator'; export class CreateUserDto { @@ -39,13 +38,6 @@ export class CreateUserDto { @IsNotEmpty() lastName: string | null; - @ApiProperty({ type: () => FileEntity }) - @IsOptional() - @Validate(IsExist, ['FileEntity', 'id'], { - message: 'imageNotExists', - }) - photo?: FileEntity | null; - @ApiProperty({ type: Role }) @Validate(IsExist, ['Role', 'id'], { message: 'roleNotExists', diff --git a/myteamwallet_backend/src/users/dto/update-user.dto.ts b/myteamwallet_backend/src/users/dto/update-user.dto.ts index 6072a33..9363f5d 100644 --- a/myteamwallet_backend/src/users/dto/update-user.dto.ts +++ b/myteamwallet_backend/src/users/dto/update-user.dto.ts @@ -7,7 +7,6 @@ import { Role } from '../../roles/entities/role.entity'; import { IsEmail, IsOptional, MinLength, Validate } from 'class-validator'; import { Status } from '../../statuses/entities/status.entity'; import { IsNotExist } from '../../utils/validators/is-not-exists.validator'; -import { FileEntity } from '../../files/entities/file.entity'; import { IsExist } from '../../utils/validators/is-exists.validator'; export class UpdateUserDto extends PartialType(CreateUserDto) { @@ -37,13 +36,6 @@ export class UpdateUserDto extends PartialType(CreateUserDto) { @IsOptional() lastName?: string | null; - @ApiProperty({ type: () => FileEntity }) - @IsOptional() - @Validate(IsExist, ['FileEntity', 'id'], { - message: 'imageNotExists', - }) - photo?: FileEntity | null; - @ApiProperty({ type: Role }) @IsOptional() @Validate(IsExist, ['Role', 'id'], { diff --git a/myteamwallet_backend/src/users/entities/user.entity.ts b/myteamwallet_backend/src/users/entities/user.entity.ts index 8a8d007..455ef43 100644 --- a/myteamwallet_backend/src/users/entities/user.entity.ts +++ b/myteamwallet_backend/src/users/entities/user.entity.ts @@ -14,7 +14,6 @@ import { } from 'typeorm'; import { Role } from '../../roles/entities/role.entity'; import { Status } from '../../statuses/entities/status.entity'; -import { FileEntity } from '../../files/entities/file.entity'; import * as bcrypt from 'bcryptjs'; import { EntityHelper } from 'src/utils/entity-helper'; import { AuthProvidersEnum } from 'src/auth/auth-providers.enum'; @@ -66,11 +65,6 @@ export class User extends EntityHelper { @Column({ nullable: true }) lastName: string | null; - @ManyToOne(() => FileEntity, { - eager: true, - }) - photo?: FileEntity | null; - @ManyToOne(() => Role, { eager: true, })