✨ Update all for Postgres and new techniques
This commit is contained in:
@@ -27,17 +27,14 @@ export const api = {
|
||||
async getUsers(token: string) {
|
||||
return axios.get<IUserProfile[]>(`${apiUrl}/api/v1/users/`, authHeaders(token));
|
||||
},
|
||||
async updateUser(token: string, name: string, data: IUserProfileUpdate) {
|
||||
return axios.put(`${apiUrl}/api/v1/users/${name}`, data, authHeaders(token));
|
||||
async updateUser(token: string, userId: number, data: IUserProfileUpdate) {
|
||||
return axios.put(`${apiUrl}/api/v1/users/${userId}`, data, authHeaders(token));
|
||||
},
|
||||
async createUser(token: string, data: IUserProfileCreate) {
|
||||
return axios.post(`${apiUrl}/api/v1/users/`, data, authHeaders(token));
|
||||
},
|
||||
async getRoles(token: string) {
|
||||
return axios.get(`${apiUrl}/api/v1/roles/`, authHeaders(token));
|
||||
},
|
||||
async passwordRecovery(username: string) {
|
||||
return axios.post(`${apiUrl}/api/v1/password-recovery/${username}`);
|
||||
async passwordRecovery(email: string) {
|
||||
return axios.post(`${apiUrl}/api/v1/password-recovery/${email}`);
|
||||
},
|
||||
async resetPassword(password: string, token: string) {
|
||||
return axios.post(`${apiUrl}/api/v1/reset-password/`, {
|
||||
|
Reference in New Issue
Block a user