import axiosInstance from "../http/axiosInstance";

export default class AuthService {
    static async login(data: any) {
        return await axiosInstance.post(`/auth/login`, data, {
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    }

    static async refreshToken(token: string) {
        return await axiosInstance.post(`/auth/refresh_token/${token}`)
    }

    static async getCurrentUser(token: string) {
        return await axiosInstance.get(`/auth/get_current_user/${token}`)
    }
}