From 23b71558c7cde7224a5bbc103a32aaca25f18c90 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=EC=A1=B0=EB=8C=80=ED=9D=AC?= <joedaehui@ajou.ac.kr>
Date: Fri, 15 Nov 2024 10:56:46 +0900
Subject: [PATCH] =?UTF-8?q?feat:=20=EC=8A=A4=EC=BC=80=EC=A4=84=20=EC=A0=84?=
 =?UTF-8?q?=EC=B2=B4=20=EC=A1=B0=ED=9A=8C=20=EC=BB=A8=ED=8A=B8=EB=A1=A4?=
 =?UTF-8?q?=EB=9F=AC=20(#6)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 controllers/scheduleController.js | 24 +++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)

diff --git a/controllers/scheduleController.js b/controllers/scheduleController.js
index d4333d4..666917b 100644
--- a/controllers/scheduleController.js
+++ b/controllers/scheduleController.js
@@ -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
-- 
GitLab