feat: create new user with password
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
import axios from 'axios';
|
||||
// import { Auth, Tokens } from '../types/auth';
|
||||
import axiosRetry from 'axios-retry';
|
||||
import { Auth, Tokens } from '@/types/auth';
|
||||
import { useAuthStore } from '@/store/authStore';
|
||||
import { AuthService } from '@/services/authService';
|
||||
import { User, UserUpdate } from '@/types/user';
|
||||
import { User, UserCreate } from '@/types/user';
|
||||
|
||||
const baseURL = `${import.meta.env.VITE_APP_HTTP_PROTOCOL}://${
|
||||
import.meta.env.VITE_APP_API_URL
|
||||
@@ -115,10 +114,13 @@ const api = {
|
||||
return response.data;
|
||||
},
|
||||
|
||||
async createUser(user: UserUpdate): Promise<User> {
|
||||
async createUser(user: UserCreate): Promise<User> {
|
||||
const response = await base.post<User>('/account', user);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
// keyrings
|
||||
async setPassword(userId: number, password: string): Promise<any> {},
|
||||
};
|
||||
|
||||
export default api;
|
||||
|
Reference in New Issue
Block a user