Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/auth.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const kakaoStrategy = new KakaoStrategy(
{
clientID: process.env.PASSPORT_KAKAO_CLIENT_ID,
clientSecret: process.env.PASSPORT_KAKAO_CLIENT_SECRET,
callbackURL: "http://localhost:3000/api/users/oauth2/callback/kakao",
callbackURL: `${process.env.BASE_URL}/api/users/oauth2/callback/google`,
scope: undefined,
state: true,
},
Expand Down
4 changes: 3 additions & 1 deletion src/common/swagger/user.json
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,7 @@
"createdAt" :{"type":"string", "example": "2025-08-04T02:31:36.000Z"},
"commissionTitle":{"type":"string", "example":"테스트 커미션 글"},
"workingTime":{"type":"string", "example":"33일"},
"review_thumbnail":{"type":"string", "example":"https://example.com/reviewThumbnail1.png"},
"writer":{
"type":"object",
"properties":{
Expand All @@ -785,6 +786,7 @@
"items":{"type":"string"},
"example":["감성", "낙서"]
},
"bookmark":{"type":"boolean", "example":false,
"commission_img":{"type":"string", "example":"http://example.com/image.jpg"}
}
}
Expand Down Expand Up @@ -846,5 +848,5 @@
}
}
}

}

10 changes: 5 additions & 5 deletions src/user/service/user.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -384,19 +384,19 @@ export const UserService = {
createdAt: r.createdAt,
commissionTitle: r.request.commission.title,
workingTime: workingTime,
review_thumbnail: images.length > 0 ? images[0] : null,
writer: {
nickname: r.user.nickname
},
reviewImage: images
};
})
};
})
);

// 작가가 등록한 커미션 목록
const commissions = await UserRepository.FetchArtistCommissions(artistId, userId);
const commissionList = await Promise.all(
commissions.map(async (c) => {
const images = await CommissionRepository.findImagesByCommissionId(c.id); // c.id == targetId
const images = await CommissionRepository.findThumbnailImageByCommissionId(c.id); // c.id == targetId

return {
id: c.id,
Expand All @@ -407,7 +407,7 @@ export const UserService = {
tags: c.commissionTags.map(t => t.tag.name),
thumbnail: c.thumbnailImage,
bookmark: c.bookmarks.length > 0,
commission_img: images.length > 0 ? images[0].url : null // 첫 번째 이미지를 대표로
commission_img: images?.imageUrl ?? null
};
})
);
Expand Down