File tree Expand file tree Collapse file tree 3 files changed +18
-3
lines changed
Expand file tree Collapse file tree 3 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -342,5 +342,17 @@ export const CommissionRepository = {
342342 } ) ;
343343
344344 return user ?. nickname || null ;
345+ } ,
346+
347+ // commission title 불러오기
348+ async findCommissionTitle ( requestId ) {
349+ const row = await prisma . request . findUnique ( {
350+ where :{ id :requestId } ,
351+ select :{
352+ commission :{ select : { title :true } }
353+ }
354+ } )
355+
356+ return row ?. commission ?. title ?? null ;
345357 }
346358}
Original file line number Diff line number Diff line change 208208 "rate" :{"type" :" integer" , "example" :5 },
209209 "content" :{"type" :" string" , "example" :" 좋았습니다" },
210210 "createdAt" :{"type" :" string" , "example" :" 2025-08-09T12:30:00.000Z" },
211- "updatedAt" :{"type" :" string" , "example" :" 2025-08-09T12:30:00.000Z" }
211+ "updatedAt" :{"type" :" string" , "example" :" 2025-08-09T12:30:00.000Z" },
212+ "reviewThumbnail" :{"type" :" string" , "example" :" null" },
213+ "title" :{"type" :" string" , "example" :" 낙서 타입 커미션" }
212214 }
213215 }
214216 }
Original file line number Diff line number Diff line change @@ -134,9 +134,10 @@ export const UserService = {
134134 const reviewsThumbnailImage = await Promise . all (
135135 reviews . map ( async ( r ) => {
136136 const images = await reviewRepository . getImagesByTarget ( "review" , r . id ) ;
137+ const title = await CommissionRepository . findCommissionTitle ( r . requestId ) ;
137138 const reviewThumbnail = images ?. [ 0 ] ?. imageUrl ?? null ;
138139
139- return { ...r , reviewThumbnail}
140+ return { ...r , reviewThumbnail, title }
140141 } )
141142 )
142143
@@ -296,7 +297,7 @@ export const UserService = {
296297
297298 // 작가 팔로우 취소하기
298299 async CancelArtistFollow ( accountId , artistId ) {
299- const artist = await UserRepository . findArtistById ( artistId ) ;
300+ const artist = await UserRepository . findArtistById ( accountId ) ;
300301
301302 if ( ! artist )
302303 throw new ArtistNotFound ( ) ;
You can’t perform that action at this time.
0 commit comments