Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend/pirocheck/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/api/api.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import axios from "axios";

const api = axios.create({
baseURL: "http://api.pirocheck.org:8080/api",
baseURL: "https://api.pirocheck.org/api",
// 수정 필요한지 재검 필요함
// "http://api.pirocheck.org:8080/api"
withCredentials: true,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/api/user.js
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
33 changes: 16 additions & 17 deletions frontend/src/pages/admin/AdminStudentAssignment.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const AdminStudentAssignment = () => {
id: task.id,
label: task.assignmentName,
status: task.status,
//modified: false,
modified: false,
})),
})),
}));
Expand All @@ -64,21 +64,22 @@ 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);
};
*/



const handleSave = async (taskId, status) => {
Expand Down Expand Up @@ -134,8 +135,6 @@ const AdminStudentAssignment = () => {
value={task.status}
onChange={(e) =>
handleStatusChange(
weekIdx,
dayIdx,
taskIdx,
e.target.value
)
Expand Down
2 changes: 1 addition & 1 deletion frontend/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
},
Expand Down
Loading