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

feat: part 라우트 추가

parent 2be38fc6
No related branches found
No related tags found
1 merge request!10Parts 추가
......@@ -8,7 +8,19 @@ const partRouter = Router();
partRouter.get(
'/',
wrapAsync(async (req, res) => {
return res.send({ message: 'parts thigns' });
const { partType, filters } = req.query;
const parts = await PartService.getParts(partType, filters);
return res.sendResponse('', 200, { parts });
})
);
partRouter.get(
'/filters',
wrapAsync(async (req, res) => {
const filters = await PartService.getFilters();
return res.sendResponse('', 200, filters);
})
);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment