chore: update eslint and prettier configuration
This commit is contained in:
@@ -1,18 +1,31 @@
|
||||
import type { AuthResponseData, LoginPayload, MeResponse, PermissionResponse } from '@/types';
|
||||
import type {
|
||||
AuthResponseData,
|
||||
LoginPayload,
|
||||
MeResponse,
|
||||
PermissionResponse,
|
||||
} from '@/types';
|
||||
import { API_ROUTES } from '@/constants/apiRoutes';
|
||||
import axiosClient, { axiosAuth } from '../axios/axios';
|
||||
|
||||
export const authService = {
|
||||
login: async (payload: LoginPayload): Promise<AuthResponseData> => {
|
||||
const response = await axiosAuth.post<AuthResponseData>(API_ROUTES.AUTH.LOGIN, payload, {
|
||||
withCredentials: true,
|
||||
});
|
||||
const response = await axiosAuth.post<AuthResponseData>(
|
||||
API_ROUTES.AUTH.LOGIN,
|
||||
payload,
|
||||
{
|
||||
withCredentials: true,
|
||||
},
|
||||
);
|
||||
return response.data;
|
||||
},
|
||||
refresh: async (): Promise<AuthResponseData> => {
|
||||
const response = await axiosAuth.post<AuthResponseData>(API_ROUTES.AUTH.REFRESH, {}, {
|
||||
withCredentials: true,
|
||||
});
|
||||
const response = await axiosAuth.post<AuthResponseData>(
|
||||
API_ROUTES.AUTH.REFRESH,
|
||||
{},
|
||||
{
|
||||
withCredentials: true,
|
||||
},
|
||||
);
|
||||
return response.data;
|
||||
},
|
||||
logout: async (): Promise<void> => {
|
||||
|
||||
Reference in New Issue
Block a user