Skip to content
Snippets Groups Projects
Verified Commit 30bccf1c authored by Eunhak Lee's avatar Eunhak Lee
Browse files

fix: response 의 구조와 맞지 않는 곳 수정

parent 772baba4
No related branches found
No related tags found
1 merge request!21fix: response 의 구조와 맞지 않는 곳 수정
Pipeline #10841 passed
......@@ -15,11 +15,15 @@ const ShareRepository = {
const resp = await pool.query(
`SELECT
shares.combination_id,
users.nickname,
array(SELECT relations.part_id FROM relations WHERE relations.combination_id = shares.combination_id) as parts,
shares.created_at,
(SELECT created_at FROM combinations WHERE combinations.id = shares.combination_id) as verified_at
FROM shares
WHERE uuid=$1;`,
LEFT JOIN combinations ON shares.combination_id = combinations.id
LEFT JOIN users ON combinations.owner_id = users.id
WHERE uuid=$1
;`,
[uniqueId]
);
const [row] = resp.rows;
......
......@@ -113,9 +113,9 @@ const PartService = {
async getCombinationByUuid(uuid) {
if (!uuid) throw new ReportableError(400, '올바르지 않은 요청입니다.');
const { combination_id, parts, created_at, updated_at } =
const { combination_id, nickname, parts, created_at, verified_at } =
await ShareRepository.getCombinationByUuid(uuid);
return { combination_id, parts, created_at, updated_at };
return { combination_id, nickname, parts, created_at, verified_at };
},
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment