파일
wbx-spring/wtm-frontend-vue/src/modules/user/user.service.ts
accura0117 cda5f9591e feat: React 18 프론트엔드 추가 및 프로젝트 구조 정리
- wtm-frontend → wtm-frontend-vue 이름 변경
- wtm-frontend-react 추가 (React 18 + PrimeReact + Zustand)
  - 동일한 모듈 구조 및 API 연동 (Vue 버전과 기능 동일)
  - Vue:5173 / React:5174 포트 분리
- 개발자 가이드에 React 프론트엔드 안내 추가
- .gitignore: Claude/OMC, 문서 생성 스크립트, package-lock 제외
- 불필요 파일 git 추적 제거 (.omc, generate_*.py, regenerate_*.py)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 20:50:23 +09:00

13 줄
842 B
TypeScript

import api from '@/core/api/axios';
import type { PageResponse } from '@/core/api/api.types';
const BASE = '/api/wtm/users';
export const userService = {
getAll: (params?: Record<string, unknown>) => api.get<PageResponse<unknown>>(`${BASE}`, { params }),
getById: (id: number) => api.get(`${BASE}/${id}`),
update: (id: number, data: unknown) => api.put(`${BASE}/${id}`, data),
updateRoles: (id: number, roles: unknown) => api.put(`${BASE}/${id}/roles`, roles),
uploadInternal: (file: File) => { const f = new FormData(); f.append('file', file); return api.post(`${BASE}/upload/internal`, f); },
uploadSubcontractor: (file: File) => { const f = new FormData(); f.append('file', file); return api.post(`${BASE}/upload/subcontractor`, f); },
downloadTemplate: () => api.get(`${BASE}/upload/template`, { responseType: 'blob' }),
};