another step constructing base project

This commit is contained in:
hamid
2026-06-18 01:19:23 +03:30
parent 5388bea320
commit e135b0b919
27 changed files with 1022 additions and 355 deletions
@@ -0,0 +1,16 @@
import { clientFetch } from '@/lib/api/client';
import type { AuthTokens, LoginDto, User } from '../types';
export const AuthClientApi = {
login: (dto: LoginDto) =>
clientFetch<AuthTokens>('/auth/login', {
method: 'POST',
body: JSON.stringify(dto),
}),
logout: () =>
clientFetch<void>('/auth/logout', { method: 'POST' }),
getCurrentUser: () =>
clientFetch<User>('/auth/me'),
};