Skip to content
Snippets Groups Projects
Commit 4add93e5 authored by Lee WooChang's avatar Lee WooChang
Browse files

Merge branch 'fix/api-response-naming' into 'main'

조합 api 반환값 네이밍 통일

See merge request !18
parents b82ea2e8 d923ccc8
No related branches found
No related tags found
1 merge request!18조합 api 반환값 네이밍 통일
Pipeline #10818 failed
......@@ -34,7 +34,7 @@ const PartRepository = {
const query = `
SELECT DISTINCT p.${column}
FROM relations r
JOIN part_info_${type} p ON r.part_id = p.part_id -- id 대신 part_id 사용
JOIN part_info_${type} p ON r.part_id = p.part_id
WHERE p.${column} IS NOT NULL
ORDER BY p.${column}
`;
......@@ -67,6 +67,7 @@ const PartRepository = {
`;
const result = await pool.query(query);
return result.rows;
},
......
......@@ -77,7 +77,9 @@ const PartService = {
async getCombinations() {
const allCombinations = await PartRepository.getAllCombinations();
return allCombinations;
return allCombinations.map((combination) => ({
partIds: combination.partids,
}));;
},
async getFilteredCombinations(filters) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment