Files
jaejadle/nextjs/lib/services/auth.ts
Mayne0213 f78454c2a1
Some checks failed
Build Docker Image / build-and-push (push) Has been cancelled
CI / lint-and-build (push) Has been cancelled
CHORE(merge): merge from develop
- Initial setup and all features from develop branch
- Includes: auth, deploy, docker, style fixes
- K3S deployment configuration
2026-01-06 17:29:16 +09:00

33 lines
632 B
TypeScript

import { apiGet, apiPost } from "@/lib/api";
import { API_ENDPOINTS } from "@/const";
export interface User {
id: number;
userId: string;
userName: string;
}
export interface SignUpData {
userId: string;
userPassword: string;
userCheckPassword: string;
userName: string;
userPhone: string;
authCode?: string;
}
/**
* 현재 로그인한 사용자 정보 조회
*/
export async function getMe(): Promise<User> {
return apiGet<User>(API_ENDPOINTS.AUTH.ME);
}
/**
* 회원가입
*/
export async function signUp(data: SignUpData): Promise<void> {
return apiPost<void>(API_ENDPOINTS.AUTH.SIGN_UP, data);
}