- client.js JSDoc 추가 (apiFetch, tryRefresh, apiUpload, localizeError) - auth.js 단순 함수 JSDoc 제거, createLaunchTicket why 주석 유지 - chain.js BASE 중복 선언 이유 주석 추가, 단순 함수 JSDoc 제거 - announcements.js 후행 빈 줄 제거 - users.js getUsers 쿼리스트링 → URLSearchParams 변경 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
18 lines
442 B
JavaScript
18 lines
442 B
JavaScript
import { apiFetch } from './client';
|
|
|
|
export function getUsers(offset = 0, limit = 20) {
|
|
const params = new URLSearchParams({ offset, limit });
|
|
return apiFetch(`/api/users?${params}`);
|
|
}
|
|
|
|
export function updateUserRole(id, role) {
|
|
return apiFetch(`/api/users/${id}/role`, {
|
|
method: 'PATCH',
|
|
body: JSON.stringify({ role }),
|
|
});
|
|
}
|
|
|
|
export function deleteUser(id) {
|
|
return apiFetch(`/api/users/${id}`, { method: 'DELETE' });
|
|
}
|