diff --git a/frontend/src/Attendance.jsx b/frontend/src/Attendance.jsx index 1abe9db..66c2da3 100644 --- a/frontend/src/Attendance.jsx +++ b/frontend/src/Attendance.jsx @@ -3,7 +3,7 @@ import Header from "./components/Header"; import InputBlock from "./components/InputBlock"; import AttendanceWeekInfo from "./components/AttendanceWeekInfo"; import styles from "./Attendance.module.css"; -import axios from "axios"; +import api from "./api/api"; const Attendance = () => { const [attendanceCode, setAttendanceCode] = useState([""]); @@ -88,7 +88,7 @@ const Attendance = () => { if (!userId) return; // 유저 전체 출석 데이터 불러오기 - const res = await axios.get(`/api/attendance/user`, { + const res = await api.get(`/attendance/user`, { params: { userId }, withCredentials: true, // 세션 기반 인증 요청처리 }); diff --git a/frontend/src/api/user.js b/frontend/src/api/user.js index 749dc0a..f91670c 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/login/login", { + const res = await fetch("http://www.pirocheck.org/api/login", { method: "POST", headers: { "Content-Type": "application/json",