Skip to content

Commit 234921a

Browse files
authored
Missing files from #118 (#125)
Everything compiled fine, but there was doubled content
1 parent 5557951 commit 234921a

2 files changed

Lines changed: 5 additions & 29 deletions

File tree

src/assos/dto/req/assos-update-req.dto.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
IsUUID,
1010
ValidateNested,
1111
} from 'class-validator';
12-
import { TranslatedTextDto } from '../../../utils';
12+
import { TranslationReqDto } from '../../../app.dto';
1313

1414
export default class AssosUpdateReqDto {
1515
@IsOptional()
@@ -24,14 +24,14 @@ export default class AssosUpdateReqDto {
2424
logo?: string;
2525

2626
@IsOptional()
27-
@Type(() => TranslatedTextDto)
27+
@Type(() => TranslationReqDto)
2828
@ValidateNested()
29-
descriptionShort?: TranslatedTextDto;
29+
descriptionShort?: TranslationReqDto;
3030

3131
@IsOptional()
32-
@Type(() => TranslatedTextDto)
32+
@Type(() => TranslationReqDto)
3333
@ValidateNested()
34-
description?: TranslatedTextDto;
34+
description?: TranslationReqDto;
3535

3636
@IsOptional()
3737
@IsString()

src/utils.ts

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { IsNotEmpty, IsOptional, IsString } from 'class-validator';
21
import { Language, Permission } from '@prisma/client';
32
import { createEditor } from 'lexical';
43
import { Translation } from './prisma/types';
@@ -65,29 +64,6 @@ const exhaustiveLanguage = <CheckArray extends readonly Language[]>(array: (
6564
: 'Missing some values from Language')) => array;
6665
export const languages = exhaustiveLanguage(['fr', 'en', 'es', 'de', 'zh']);
6766

68-
export class TranslatedTextDto {
69-
@IsOptional()
70-
@IsString()
71-
@IsNotEmpty()
72-
fr?: string;
73-
@IsOptional()
74-
@IsString()
75-
@IsNotEmpty()
76-
en?: string;
77-
@IsOptional()
78-
@IsString()
79-
@IsNotEmpty()
80-
de?: string;
81-
@IsOptional()
82-
@IsString()
83-
@IsNotEmpty()
84-
es?: string;
85-
@IsOptional()
86-
@IsString()
87-
@IsNotEmpty()
88-
zh?: string;
89-
}
90-
9167
export class PermissionManager {
9268
public readonly hardPermissions: Permission[];
9369
public readonly softPermissions: {

0 commit comments

Comments
 (0)