feat(client): add create user
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user