Skip to content
Merged
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
13 changes: 12 additions & 1 deletion frontend/src/api/adminassignment.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,23 @@
import api from "./api";

// 학생 정보 불러오기
/*
export const fetchStudentInfo = (studentId) =>
api.get(`/admin/users/${studentId}`);
*/
export const fetchStudentInfo = async (studentId) => {
try {
const res = await api.get(`/admin/managestudent/${studentId}`);
return res.data;
} catch (error) {
console.error("학생 상세 정보 불러오기 실패:", error);
throw error;
}
};

// 주차별 과제 데이터 불러오기
export const fetchStudentAssignments = (userId) =>
api.get(`/assignment/${userId}`); // ← 수정됨
api.get(`/assignment/${userId}`);

// 과제 상태 수정 (PUT)
export const updateAssignmentStatus = (userId, assignmentId, status) =>
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/api/adminattendance.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,15 @@ export const getStudentAttendance = async (studentId) => {
// 학생 기본 정보 조회
export const getStudentBasicInfo = async (studentId) => {
try {
const res = await api.get(`/admin/users/${studentId}`);
const res = await api.get(`/admin/managestudent/${studentId}`);
return res.data;
} catch (error) {
console.error("학생 기본 정보 불러오기 실패:", error);
throw error;
}
};


// 학생 출석 전체 데이터 조회 (특정 날짜와 차수 포함)
export const getStudentAttendance = async (studentId) => {
try {
Expand Down