권한설정 페이지 수정/student만

This commit is contained in:
2025-11-27 20:36:38 +09:00
parent 91c886298c
commit b1e2f6012c
3 changed files with 33 additions and 10 deletions

View File

@@ -22,17 +22,22 @@ export async function getInstructors(): Promise<UserRow[]> {
?.split('=')[1])
: null;
const apiUrl = process.env.NEXT_PUBLIC_API_BASE_URL
const baseUrl = process.env.NEXT_PUBLIC_API_BASE_URL
? `${process.env.NEXT_PUBLIC_API_BASE_URL}/admin/users/compact`
: 'https://hrdi.coconutmeet.net/admin/users/compact';
// 쿼리 파라미터 추가: type=STUDENT, limit=10
const apiUrl = new URL(baseUrl);
apiUrl.searchParams.set('type', 'STUDENT');
apiUrl.searchParams.set('limit', '10');
console.log('🔍 [getInstructors] API 호출 정보:', {
url: apiUrl,
url: apiUrl.toString(),
hasToken: !!token,
tokenLength: token?.length || 0
});
const response = await fetch(apiUrl, {
const response = await fetch(apiUrl.toString(), {
method: 'GET',
headers: {
'Content-Type': 'application/json',