From 70c865e34b6435132717c5594649fad1ea999548 Mon Sep 17 00:00:00 2001 From: qkrxogmla Date: Sun, 11 May 2025 23:55:09 +0900 Subject: [PATCH] =?UTF-8?q?fetch=20usesr=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/Attendance.jsx | 4 ++-- frontend/src/api/user.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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",