diff --git a/frontend/src/Attendance.jsx b/frontend/src/Attendance.jsx index 45f8f6b..0e72c16 100644 --- a/frontend/src/Attendance.jsx +++ b/frontend/src/Attendance.jsx @@ -151,8 +151,10 @@ const Attendance = () => { if (!userId) return; // 유저가 입력한 출석 코드 서버에 전달(서버에서 출석코드 체크) - const res = await api.post( - "/attendance/mark", + + const res = await axios.post( + "/api/attendance/mark", + { userId, code: attendanceCode[0], diff --git a/frontend/src/api/api.js b/frontend/src/api/api.js index 4ecf00d..8278d08 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://www.pirocheck.org/api", + baseURL: "http://api.pirocheck.org/api", withCredentials: true, }); diff --git a/frontend/src/api/user.js b/frontend/src/api/user.js index f91670c..811264c 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://www.pirocheck.org/api/login", { + const res = await fetch("http://api.pirocheck.org/api/login", { method: "POST", headers: { "Content-Type": "application/json",