feat(client): add create user

This commit is contained in:
2025-06-25 13:38:43 +05:00
parent 448e4264a5
commit 8f5dd07bf5
7 changed files with 38 additions and 10 deletions

View File

@@ -4,7 +4,7 @@ import axiosRetry from 'axios-retry';
import { Auth, Tokens } from '@/types/auth';
import { useAuthStore } from '@/store/authStore';
import { AuthService } from '@/services/authService';
import { User } from '@/types/user';
import { User, UserUpdate } from '@/types/user';
const baseURL = `${import.meta.env.VITE_APP_HTTP_PROTOCOL}://${
import.meta.env.VITE_APP_API_URL
@@ -114,6 +114,11 @@ const api = {
const response = await base.get<User>(`/account/${userId}`);
return response.data;
},
async createUser(user: UserUpdate): Promise<User> {
const response = await base.post<User>('/account', user);
return response.data;
},
};
export default api;