From 48b5a5131f5185916977e305c70b3444bdcf601a Mon Sep 17 00:00:00 2001 From: seonjuuu Date: Mon, 2 Jun 2025 17:41:47 +0900 Subject: [PATCH 1/8] =?UTF-8?q?[feat]=20yml=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/pirocheck/src/main/resources/application.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/pirocheck/src/main/resources/application.yml b/backend/pirocheck/src/main/resources/application.yml index bdef4aa..8d44732 100644 --- a/backend/pirocheck/src/main/resources/application.yml +++ b/backend/pirocheck/src/main/resources/application.yml @@ -17,7 +17,7 @@ server: session: cookie: http-only: true # 세션 쿠키를 HttpOnly로 설정 (JS에서 접근 불가) - secure: false # HTTPS 전용 전송 (Https -> true로 바꿔야 함) + secure: true # HTTPS 전용 전송 (Https -> true로 바꿔야 함) same-site: Lax # CSRF 방지 timeout: 30m # 세션 타임아웃 30분 (30 minutes) address: 0.0.0.0 From e603fd0cd74e1389e50769d6c5712f8bba209179 Mon Sep 17 00:00:00 2001 From: Suhjung Park <145967352+Imggaggu@users.noreply.github.com> Date: Mon, 2 Jun 2025 18:09:47 +0900 Subject: [PATCH 2/8] Update api.js --- frontend/src/api/api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/api/api.js b/frontend/src/api/api.js index 1950026..ae4217f 100644 --- a/frontend/src/api/api.js +++ b/frontend/src/api/api.js @@ -1,7 +1,7 @@ import axios from "axios"; const api = axios.create({ - baseURL: "http://api.pirocheck.org:8080/api", + baseURL: "https://api.pirocheck.org:8080/api", // 수정 필요한지 재검 필요함 // "http://api.pirocheck.org:8080/api" withCredentials: true, From 1a45c3bcb41d2ee96ce9b923c66ef8700c55d65d Mon Sep 17 00:00:00 2001 From: Suhjung Park <145967352+Imggaggu@users.noreply.github.com> Date: Mon, 2 Jun 2025 18:18:21 +0900 Subject: [PATCH 3/8] Update user.js --- frontend/src/api/user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/api/user.js b/frontend/src/api/user.js index 12e057a..3309ca5 100644 --- a/frontend/src/api/user.js +++ b/frontend/src/api/user.js @@ -1,5 +1,5 @@ export const loginUser = async ({ name, password }) => { - const res = await fetch("http://api.pirocheck.org:8080/api/login", { + const res = await fetch("https://api.pirocheck.org/api/login", { method: "POST", headers: { "Content-Type": "application/json", From 6c96fe1a73bbcb091ab155f2701a9676208abc1d Mon Sep 17 00:00:00 2001 From: Suhjung Park <145967352+Imggaggu@users.noreply.github.com> Date: Mon, 2 Jun 2025 18:18:41 +0900 Subject: [PATCH 4/8] Update api.js --- frontend/src/api/api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/api/api.js b/frontend/src/api/api.js index ae4217f..c2c9d61 100644 --- a/frontend/src/api/api.js +++ b/frontend/src/api/api.js @@ -1,7 +1,7 @@ import axios from "axios"; const api = axios.create({ - baseURL: "https://api.pirocheck.org:8080/api", + baseURL: "https://api.pirocheck.org/api", // 수정 필요한지 재검 필요함 // "http://api.pirocheck.org:8080/api" withCredentials: true, From 032f4fbf4915788f1c985c1374470034f2f394f3 Mon Sep 17 00:00:00 2001 From: Suhjung Park <145967352+Imggaggu@users.noreply.github.com> Date: Mon, 2 Jun 2025 18:19:11 +0900 Subject: [PATCH 5/8] Update vite.config.js --- frontend/vite.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/vite.config.js b/frontend/vite.config.js index 26f670c..6fe408f 100644 --- a/frontend/vite.config.js +++ b/frontend/vite.config.js @@ -7,7 +7,7 @@ export default defineConfig({ server: { proxy: { "/api": { - target: "http://api.pirocheck.org:8080/api", + target: "https://api.pirocheck.org/api", changeOrigin: true, }, }, From d863c18d351797ea5f8ba25930778165555090c0 Mon Sep 17 00:00:00 2001 From: Suhjung Park <145967352+Imggaggu@users.noreply.github.com> Date: Sat, 14 Jun 2025 22:16:43 +0900 Subject: [PATCH 6/8] Update AdminStudentAssignment.jsx --- frontend/src/pages/admin/AdminStudentAssignment.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/pages/admin/AdminStudentAssignment.jsx b/frontend/src/pages/admin/AdminStudentAssignment.jsx index c29c35e..b02cf21 100644 --- a/frontend/src/pages/admin/AdminStudentAssignment.jsx +++ b/frontend/src/pages/admin/AdminStudentAssignment.jsx @@ -42,7 +42,7 @@ const AdminStudentAssignment = () => { id: task.id, label: task.assignmentName, status: task.status, - //modified: false, + modified: false, })), })), })); From 9e28625663ab9bbeeab8090445e7f466a56d421d Mon Sep 17 00:00:00 2001 From: Suhjung Park <145967352+Imggaggu@users.noreply.github.com> Date: Sat, 14 Jun 2025 22:41:40 +0900 Subject: [PATCH 7/8] Update AdminStudentAssignment.jsx --- .../pages/admin/AdminStudentAssignment.jsx | 29 +++++++++---------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/frontend/src/pages/admin/AdminStudentAssignment.jsx b/frontend/src/pages/admin/AdminStudentAssignment.jsx index b02cf21..6a59f9e 100644 --- a/frontend/src/pages/admin/AdminStudentAssignment.jsx +++ b/frontend/src/pages/admin/AdminStudentAssignment.jsx @@ -64,19 +64,20 @@ const AdminStudentAssignment = () => { }); }, [studentId, week]); - const handleStatusChange = (weekIdx, dayIdx, taskIdx, newStatus) => { - const updated = [...weeks]; - const task = updated[weekIdx].days[dayIdx].tasks[taskIdx]; - task.status = newStatus; - task.modified = true; - setWeeks(updated); - }; - /* - const handleSave = async (taskId, status) => { - await api.put("/admin/assignment/status", { - assignmentId: taskId, - status, - }); + const handleStatusChange = (taskId, newStatus) => { + const updatedWeeks = weeks.map((weekItem) => ({ + ...weekItem, + days: weekItem.days.map((dayItem) => ({ + ...dayItem, + tasks: dayItem.tasks.map((task) => + task.id === taskId + ? { ...task, status: newStatus, modified: true } + : task + ), + })), + })); + + setWeeks(updatedWeeks); }; */ @@ -134,8 +135,6 @@ const AdminStudentAssignment = () => { value={task.status} onChange={(e) => handleStatusChange( - weekIdx, - dayIdx, taskIdx, e.target.value ) From f389fceab5baea5a024ddc5ac3e08e9e6fe46679 Mon Sep 17 00:00:00 2001 From: Suhjung Park <145967352+Imggaggu@users.noreply.github.com> Date: Sat, 14 Jun 2025 22:58:44 +0900 Subject: [PATCH 8/8] Update AdminStudentAssignment.jsx --- frontend/src/pages/admin/AdminStudentAssignment.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/pages/admin/AdminStudentAssignment.jsx b/frontend/src/pages/admin/AdminStudentAssignment.jsx index 6a59f9e..fd2d088 100644 --- a/frontend/src/pages/admin/AdminStudentAssignment.jsx +++ b/frontend/src/pages/admin/AdminStudentAssignment.jsx @@ -79,7 +79,7 @@ const AdminStudentAssignment = () => { setWeeks(updatedWeeks); }; -*/ + const handleSave = async (taskId, status) => {