Refactored forms
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import { AxiosRequestConfig } from "axios";
|
||||
import { BASE_URL } from "../constants";
|
||||
import axiosInstance from "../http/axiosInstance";
|
||||
import { IUser } from "../interfaces/user";
|
||||
|
||||
const config: AxiosRequestConfig = {
|
||||
baseURL: BASE_URL.auth,
|
||||
@ -21,4 +22,12 @@ export default class AuthService {
|
||||
static async getCurrentUser(token: string) {
|
||||
return await axiosInstance.get(`/auth/get_current_user/${token}`, config)
|
||||
}
|
||||
|
||||
static async resetPassword(email: string) {
|
||||
return await axiosInstance.put(`/auth/user/reset_password?email=${email}`, null, config)
|
||||
}
|
||||
|
||||
static async updatePassword(data: IUser) {
|
||||
return await axiosInstance.put(`/auth/user/password_change`, data, config)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user