File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ const INSTRUCTION_USER = 'deadbeef-cafe-babe-face-c0ffeecafeee' ;
Original file line number Diff line number Diff line change @@ -492,13 +492,24 @@ export class MypageResponse {
492492 profileImage : string ;
493493
494494 @ApiProperty ( {
495- description : '태그 목록' ,
496- enum : [ Tag ] ,
495+ description : '스타일 태그 목록' ,
496+ isArray : true ,
497+ enum : Tag ,
497498 } )
498499 @IsArray ( )
499500 @IsOptional ( )
500- @ValidateNested ( { each : true } )
501- tags : Tag [ ] ;
501+ @IsEnum ( Tag , { each : true } )
502+ styleTags : Tag [ ] ;
503+
504+ @ApiProperty ( {
505+ description : '음식 태그 목록' ,
506+ isArray : true ,
507+ enum : Tag ,
508+ } )
509+ @IsArray ( )
510+ @IsOptional ( )
511+ @IsEnum ( Tag , { each : true } )
512+ foodTags : Tag [ ] ;
502513
503514 @ApiProperty ( {
504515 description : 'MBTI' ,
@@ -524,9 +535,11 @@ export class MypageResponse {
524535
525536 @ApiProperty ( {
526537 description : '가장 큰 트리' ,
527- type : MypageTreeResponse ,
538+ type : [ MypageTreeResponse ] ,
528539 } )
529- @IsNotEmpty ( )
540+ @IsArray ( )
541+ @ValidateNested ( { each : true } )
542+ @Type ( ( ) => MypageTreeResponse )
530543 biggestTrees : MypageTreeResponse [ ] ;
531544
532545 @ApiProperty ( {
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import { UserParam } from './params/user';
1212import { TreeRepository } from '@/tree/repository' ;
1313import { GetFollowerCountUsecase } from './usecases/getFollowerCount' ;
1414import { GetFollowingCountUsecase } from './usecases/getFollowingCount' ;
15+ import { FOOD_TAGS , STYLE_TAGS } from '@/tree/constants' ;
1516import { UserRepository } from './repositories/user' ;
1617import { getBiggestTrees , getRecapDescription } from './tree.util' ;
1718import { CheckFollowingStatusUseCase } from './usecases/checkFollowingStatus' ;
@@ -63,13 +64,17 @@ export class UserService {
6364 ) ;
6465 }
6566
67+ const styleTags = user . tag . filter ( ( tag ) => STYLE_TAGS . includes ( tag as any ) ) ;
68+ const foodTags = user . tag . filter ( ( tag ) => FOOD_TAGS . includes ( tag as any ) ) ;
69+
6670 return {
6771 userId : user . id ,
6872 username : user . username ,
6973 nickname : user . nickname ,
7074 description : user . description ,
7175 profileImage : user . profileImageUrl ,
72- tags : user . tag ,
76+ styleTags,
77+ foodTags,
7378 mbti : user . mbti ,
7479 followerCount,
7580 followingCount,
You can’t perform that action at this time.
0 commit comments