Skip to content
Snippets Groups Projects
Commit 23b71558 authored by 조대희's avatar 조대희
Browse files

feat: 스케줄 전체 조회 컨트롤러 (#6)

parent dc324ee1
No related branches found
No related tags found
2 merge requests!31Develop,!7[#6] Schedule 컨트롤러, 라우터, 로직 개발
......@@ -107,5 +107,27 @@ class scheduleController {
}
}
/**
* 해당 사용자 전체 스케줄 조회
* GET /api/schedules
*/
async getAllSchedules(req, res) {
try {
const userId = req.user.id;
const schedules = await ScheduleService.getAllSchedules(userId);
return res.status(200).json({
success: true,
data: schedules
});
} catch (error) {
return res.status(500).json({
success: false,
error: {
message: 'Failed to fetch schedules',
code: 'FETCH_ERROR'
}
});
}
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment