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> => {
|
||||
|
||||
@@ -15,12 +15,17 @@ export const chainageService = {
|
||||
/**
|
||||
* Fetch all chainages
|
||||
*/
|
||||
getChainages: async (params?: PaginationParams): Promise<PaginatedResponse<Chainage>> => {
|
||||
getChainages: async (
|
||||
params?: PaginationParams,
|
||||
): Promise<PaginatedResponse<Chainage>> => {
|
||||
const skip = params?.skip ?? 0;
|
||||
const limit = params?.limit ?? 100;
|
||||
const response = await axiosClient.get<PaginatedResponse<Chainage>>(API_ROUTES.CHAINAGES.BASE, {
|
||||
params: { skip, limit },
|
||||
});
|
||||
const response = await axiosClient.get<PaginatedResponse<Chainage>>(
|
||||
API_ROUTES.CHAINAGES.BASE,
|
||||
{
|
||||
params: { skip, limit },
|
||||
},
|
||||
);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
@@ -33,9 +38,12 @@ export const chainageService = {
|
||||
): Promise<PaginatedResponse<Chainage>> => {
|
||||
const skip = params?.skip ?? 0;
|
||||
const limit = params?.limit ?? 100;
|
||||
const response = await axiosClient.get<PaginatedResponse<Chainage>>(API_ROUTES.CHAINAGES.BASE, {
|
||||
params: { package_id: packageId, skip, limit },
|
||||
});
|
||||
const response = await axiosClient.get<PaginatedResponse<Chainage>>(
|
||||
API_ROUTES.CHAINAGES.BASE,
|
||||
{
|
||||
params: { package_id: packageId, skip, limit },
|
||||
},
|
||||
);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
@@ -43,15 +51,24 @@ export const chainageService = {
|
||||
* Create a new chainage
|
||||
*/
|
||||
createChainage: async (data: ChainageCreate): Promise<Chainage> => {
|
||||
const response = await axiosClient.post<Chainage>(API_ROUTES.CHAINAGES.BASE, data);
|
||||
const response = await axiosClient.post<Chainage>(
|
||||
API_ROUTES.CHAINAGES.BASE,
|
||||
data,
|
||||
);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
/**
|
||||
* Update an existing chainage
|
||||
*/
|
||||
updateChainage: async (chainageId: string, data: ChainageUpdate): Promise<Chainage> => {
|
||||
const response = await axiosClient.put<Chainage>(API_ROUTES.CHAINAGES.DETAIL(chainageId), data);
|
||||
updateChainage: async (
|
||||
chainageId: string,
|
||||
data: ChainageUpdate,
|
||||
): Promise<Chainage> => {
|
||||
const response = await axiosClient.put<Chainage>(
|
||||
API_ROUTES.CHAINAGES.DETAIL(chainageId),
|
||||
data,
|
||||
);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
import axiosClient from '../axios/axios';
|
||||
import { API_ROUTES } from '@/constants/apiRoutes';
|
||||
import type { Client, ClientListParams, ClientListResponse, ClientRequest } from '@/types';
|
||||
import type {
|
||||
Client,
|
||||
ClientListParams,
|
||||
ClientListResponse,
|
||||
ClientRequest,
|
||||
} from '@/types';
|
||||
|
||||
function toClientPayload(payload: ClientRequest) {
|
||||
return {
|
||||
@@ -19,40 +24,56 @@ function toClientPayload(payload: ClientRequest) {
|
||||
}
|
||||
|
||||
export const clientService = {
|
||||
getClients: async (params?: ClientListParams): Promise<ClientListResponse> => {
|
||||
const response = await axiosClient.get<ClientListResponse>(API_ROUTES.CLIENTS.BASE, {
|
||||
params: {
|
||||
skip: params?.skip ?? 0,
|
||||
limit: params?.limit ?? 10,
|
||||
search_term: params?.search_term,
|
||||
name: params?.name,
|
||||
email: params?.email,
|
||||
contact_name: params?.contact_name,
|
||||
is_active: params?.is_active,
|
||||
sort_by: params?.sort_by,
|
||||
sort_order: params?.sort_order,
|
||||
getClients: async (
|
||||
params?: ClientListParams,
|
||||
): Promise<ClientListResponse> => {
|
||||
const response = await axiosClient.get<ClientListResponse>(
|
||||
API_ROUTES.CLIENTS.BASE,
|
||||
{
|
||||
params: {
|
||||
skip: params?.skip ?? 0,
|
||||
limit: params?.limit ?? 10,
|
||||
search_term: params?.search_term,
|
||||
name: params?.name,
|
||||
email: params?.email,
|
||||
contact_name: params?.contact_name,
|
||||
is_active: params?.is_active,
|
||||
sort_by: params?.sort_by,
|
||||
sort_order: params?.sort_order,
|
||||
},
|
||||
},
|
||||
});
|
||||
);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
getClientById: async (id: number): Promise<Client> => {
|
||||
const response = await axiosClient.get<Client>(API_ROUTES.CLIENTS.DETAIL(id));
|
||||
const response = await axiosClient.get<Client>(
|
||||
API_ROUTES.CLIENTS.DETAIL(id),
|
||||
);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
saveClient: async (payload: ClientRequest): Promise<Client> => {
|
||||
const requestPayload = toClientPayload(payload);
|
||||
const response = payload.id
|
||||
? await axiosClient.put<Client>(API_ROUTES.CLIENTS.DETAIL(payload.id), requestPayload)
|
||||
? await axiosClient.put<Client>(
|
||||
API_ROUTES.CLIENTS.DETAIL(payload.id),
|
||||
requestPayload,
|
||||
)
|
||||
: await axiosClient.post<Client>(API_ROUTES.CLIENTS.BASE, requestPayload);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
updateClientStatus: async (id: number, isActive: boolean): Promise<Client> => {
|
||||
const response = await axiosClient.patch<Client>(API_ROUTES.CLIENTS.STATUS(id), {
|
||||
is_active: isActive,
|
||||
});
|
||||
updateClientStatus: async (
|
||||
id: number,
|
||||
isActive: boolean,
|
||||
): Promise<Client> => {
|
||||
const response = await axiosClient.patch<Client>(
|
||||
API_ROUTES.CLIENTS.STATUS(id),
|
||||
{
|
||||
is_active: isActive,
|
||||
},
|
||||
);
|
||||
return response.data;
|
||||
},
|
||||
};
|
||||
|
||||
@@ -46,7 +46,10 @@ export const detectionService = {
|
||||
}
|
||||
} catch (e) {
|
||||
// Skip projects that fail to load
|
||||
console.warn(`Failed to load detections for project ${project.id}:`, e);
|
||||
console.warn(
|
||||
`Failed to load detections for project ${project.id}:`,
|
||||
e,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,12 +15,17 @@ export const packageService = {
|
||||
/**
|
||||
* Fetch all packages
|
||||
*/
|
||||
getPackages: async (params?: PaginationParams): Promise<PaginatedResponse<Package>> => {
|
||||
getPackages: async (
|
||||
params?: PaginationParams,
|
||||
): Promise<PaginatedResponse<Package>> => {
|
||||
const skip = params?.skip ?? 0;
|
||||
const limit = params?.limit ?? 100;
|
||||
const response = await axiosClient.get<PaginatedResponse<Package>>(API_ROUTES.PACKAGES.BASE, {
|
||||
params: { skip, limit },
|
||||
});
|
||||
const response = await axiosClient.get<PaginatedResponse<Package>>(
|
||||
API_ROUTES.PACKAGES.BASE,
|
||||
{
|
||||
params: { skip, limit },
|
||||
},
|
||||
);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
@@ -33,9 +38,12 @@ export const packageService = {
|
||||
): Promise<PaginatedResponse<Package>> => {
|
||||
const skip = params?.skip ?? 0;
|
||||
const limit = params?.limit ?? 100;
|
||||
const response = await axiosClient.get<PaginatedResponse<Package>>(API_ROUTES.PACKAGES.BASE, {
|
||||
params: { project_id: projectId, skip, limit },
|
||||
});
|
||||
const response = await axiosClient.get<PaginatedResponse<Package>>(
|
||||
API_ROUTES.PACKAGES.BASE,
|
||||
{
|
||||
params: { project_id: projectId, skip, limit },
|
||||
},
|
||||
);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
@@ -43,15 +51,24 @@ export const packageService = {
|
||||
* Create a new package
|
||||
*/
|
||||
createPackage: async (data: PackageCreate): Promise<Package> => {
|
||||
const response = await axiosClient.post<Package>(API_ROUTES.PACKAGES.BASE, data);
|
||||
const response = await axiosClient.post<Package>(
|
||||
API_ROUTES.PACKAGES.BASE,
|
||||
data,
|
||||
);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
/**
|
||||
* Update an existing package
|
||||
*/
|
||||
updatePackage: async (packageId: string, data: PackageUpdate): Promise<Package> => {
|
||||
const response = await axiosClient.put<Package>(API_ROUTES.PACKAGES.DETAIL(packageId), data);
|
||||
updatePackage: async (
|
||||
packageId: string,
|
||||
data: PackageUpdate,
|
||||
): Promise<Package> => {
|
||||
const response = await axiosClient.put<Package>(
|
||||
API_ROUTES.PACKAGES.DETAIL(packageId),
|
||||
data,
|
||||
);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
import axiosClient from '../axios/axios';
|
||||
import { API_ROUTES } from '@/constants/apiRoutes';
|
||||
import type { Plan, PlanListParams, PlanListResponse, PlanRequest } from '@/types';
|
||||
import type {
|
||||
Plan,
|
||||
PlanListParams,
|
||||
PlanListResponse,
|
||||
PlanRequest,
|
||||
} from '@/types';
|
||||
|
||||
function toPlanPayload(payload: PlanRequest) {
|
||||
return {
|
||||
@@ -22,34 +27,43 @@ function toPlanPayload(payload: PlanRequest) {
|
||||
|
||||
export const planService = {
|
||||
getPlans: async (params?: PlanListParams): Promise<PlanListResponse> => {
|
||||
const response = await axiosClient.get<PlanListResponse>(API_ROUTES.PLANS.BASE, {
|
||||
params: {
|
||||
skip: params?.skip ?? 0,
|
||||
limit: params?.limit ?? 10,
|
||||
search_term: params?.search_term,
|
||||
name: params?.name,
|
||||
slug: params?.slug,
|
||||
is_active: params?.is_active,
|
||||
is_custom: params?.is_custom,
|
||||
sort_by: params?.sort_by,
|
||||
sort_order: params?.sort_order,
|
||||
const response = await axiosClient.get<PlanListResponse>(
|
||||
API_ROUTES.PLANS.BASE,
|
||||
{
|
||||
params: {
|
||||
skip: params?.skip ?? 0,
|
||||
limit: params?.limit ?? 10,
|
||||
search_term: params?.search_term,
|
||||
name: params?.name,
|
||||
slug: params?.slug,
|
||||
is_active: params?.is_active,
|
||||
is_custom: params?.is_custom,
|
||||
sort_by: params?.sort_by,
|
||||
sort_order: params?.sort_order,
|
||||
},
|
||||
},
|
||||
});
|
||||
);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
savePlan: async (payload: PlanRequest): Promise<Plan> => {
|
||||
const requestPayload = toPlanPayload(payload);
|
||||
const response = payload.id
|
||||
? await axiosClient.put<Plan>(API_ROUTES.PLANS.DETAIL(payload.id), requestPayload)
|
||||
? await axiosClient.put<Plan>(
|
||||
API_ROUTES.PLANS.DETAIL(payload.id),
|
||||
requestPayload,
|
||||
)
|
||||
: await axiosClient.post<Plan>(API_ROUTES.PLANS.BASE, requestPayload);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
updatePlanStatus: async (id: number, isActive: boolean): Promise<Plan> => {
|
||||
const response = await axiosClient.patch<Plan>(API_ROUTES.PLANS.STATUS(id), {
|
||||
is_active: isActive,
|
||||
});
|
||||
const response = await axiosClient.patch<Plan>(
|
||||
API_ROUTES.PLANS.STATUS(id),
|
||||
{
|
||||
is_active: isActive,
|
||||
},
|
||||
);
|
||||
return response.data;
|
||||
},
|
||||
};
|
||||
|
||||
@@ -15,12 +15,17 @@ export const projectService = {
|
||||
/**
|
||||
* Fetch all projects
|
||||
*/
|
||||
getProjects: async (params?: PaginationParams): Promise<PaginatedResponse<Project>> => {
|
||||
getProjects: async (
|
||||
params?: PaginationParams,
|
||||
): Promise<PaginatedResponse<Project>> => {
|
||||
const skip = params?.skip ?? 0;
|
||||
const limit = params?.limit ?? 100;
|
||||
const response = await axiosClient.get<PaginatedResponse<Project>>(API_ROUTES.PROJECTS.BASE, {
|
||||
params: { skip, limit },
|
||||
});
|
||||
const response = await axiosClient.get<PaginatedResponse<Project>>(
|
||||
API_ROUTES.PROJECTS.BASE,
|
||||
{
|
||||
params: { skip, limit },
|
||||
},
|
||||
);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
@@ -28,15 +33,24 @@ export const projectService = {
|
||||
* Create a new project
|
||||
*/
|
||||
createProject: async (data: ProjectCreate): Promise<Project> => {
|
||||
const response = await axiosClient.post<Project>(API_ROUTES.PROJECTS.BASE, data);
|
||||
const response = await axiosClient.post<Project>(
|
||||
API_ROUTES.PROJECTS.BASE,
|
||||
data,
|
||||
);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
/**
|
||||
* Update an existing project
|
||||
*/
|
||||
updateProject: async (projectId: string, data: ProjectUpdate): Promise<Project> => {
|
||||
const response = await axiosClient.put<Project>(API_ROUTES.PROJECTS.DETAIL(projectId), data);
|
||||
updateProject: async (
|
||||
projectId: string,
|
||||
data: ProjectUpdate,
|
||||
): Promise<Project> => {
|
||||
const response = await axiosClient.put<Project>(
|
||||
API_ROUTES.PROJECTS.DETAIL(projectId),
|
||||
data,
|
||||
);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
|
||||
@@ -1,22 +1,30 @@
|
||||
import axiosClient from '../axios/axios';
|
||||
import { API_ROUTES } from '@/constants/apiRoutes';
|
||||
import type { Role, RoleListParams, RoleListResponse, RoleRequest } from '@/types';
|
||||
import type {
|
||||
Role,
|
||||
RoleListParams,
|
||||
RoleListResponse,
|
||||
RoleRequest,
|
||||
} from '@/types';
|
||||
|
||||
export const roleService = {
|
||||
getRoles: async (params?: RoleListParams): Promise<RoleListResponse> => {
|
||||
const response = await axiosClient.get<RoleListResponse>(API_ROUTES.ROLES.BASE, {
|
||||
params: {
|
||||
skip: params?.skip ?? 0,
|
||||
limit: params?.limit ?? 10,
|
||||
search_term: params?.search_term,
|
||||
name: params?.name,
|
||||
display_name: params?.display_name,
|
||||
description: params?.description,
|
||||
effective_status: params?.effective_status,
|
||||
sort_by: params?.sort_by,
|
||||
sort_order: params?.sort_order,
|
||||
const response = await axiosClient.get<RoleListResponse>(
|
||||
API_ROUTES.ROLES.BASE,
|
||||
{
|
||||
params: {
|
||||
skip: params?.skip ?? 0,
|
||||
limit: params?.limit ?? 10,
|
||||
search_term: params?.search_term,
|
||||
name: params?.name,
|
||||
display_name: params?.display_name,
|
||||
description: params?.description,
|
||||
effective_status: params?.effective_status,
|
||||
sort_by: params?.sort_by,
|
||||
sort_order: params?.sort_order,
|
||||
},
|
||||
},
|
||||
});
|
||||
);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
@@ -33,9 +41,12 @@ export const roleService = {
|
||||
},
|
||||
|
||||
updateRoleStatus: async (id: number, isActive: boolean): Promise<Role> => {
|
||||
const response = await axiosClient.patch<Role>(API_ROUTES.ROLES.STATUS(id), {
|
||||
is_active: isActive,
|
||||
});
|
||||
const response = await axiosClient.patch<Role>(
|
||||
API_ROUTES.ROLES.STATUS(id),
|
||||
{
|
||||
is_active: isActive,
|
||||
},
|
||||
);
|
||||
return response.data;
|
||||
},
|
||||
};
|
||||
|
||||
@@ -37,17 +37,22 @@ function toUpdatePayload(payload: TenantUpdateRequest) {
|
||||
}
|
||||
|
||||
export const tenantService = {
|
||||
getTenants: async (params?: TenantListParams): Promise<TenantListResponse> => {
|
||||
const response = await axiosClient.get<TenantListResponse>(API_ROUTES.TENANTS.BASE, {
|
||||
params: {
|
||||
skip: params?.skip ?? 0,
|
||||
limit: params?.limit ?? 10,
|
||||
search_term: params?.search_term,
|
||||
is_active: params?.is_active,
|
||||
sort_by: params?.sort_by,
|
||||
sort_order: params?.sort_order,
|
||||
getTenants: async (
|
||||
params?: TenantListParams,
|
||||
): Promise<TenantListResponse> => {
|
||||
const response = await axiosClient.get<TenantListResponse>(
|
||||
API_ROUTES.TENANTS.BASE,
|
||||
{
|
||||
params: {
|
||||
skip: params?.skip ?? 0,
|
||||
limit: params?.limit ?? 10,
|
||||
search_term: params?.search_term,
|
||||
is_active: params?.is_active,
|
||||
sort_by: params?.sort_by,
|
||||
sort_order: params?.sort_order,
|
||||
},
|
||||
},
|
||||
});
|
||||
);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
|
||||
@@ -1,30 +1,44 @@
|
||||
import axiosClient from '../axios/axios';
|
||||
import { API_ROUTES } from '@/constants/apiRoutes';
|
||||
import type { AdministrationUser, UserListParams, UserListResponse, UserRequest } from '@/types';
|
||||
import type {
|
||||
AdministrationUser,
|
||||
UserListParams,
|
||||
UserListResponse,
|
||||
UserRequest,
|
||||
} from '@/types';
|
||||
|
||||
export const userService = {
|
||||
getUsers: async (params?: UserListParams): Promise<UserListResponse> => {
|
||||
const response = await axiosClient.get<UserListResponse>(API_ROUTES.USERS.BASE, {
|
||||
params: {
|
||||
skip: params?.skip ?? 0,
|
||||
limit: params?.limit ?? 10,
|
||||
search_term: params?.search_term,
|
||||
userName: params?.userName,
|
||||
first_name: params?.first_name,
|
||||
phone_number: params?.phone_number,
|
||||
roles: params?.roles,
|
||||
effective_status: params?.effective_status,
|
||||
sort_by: params?.sort_by,
|
||||
sort_order: params?.sort_order,
|
||||
const response = await axiosClient.get<UserListResponse>(
|
||||
API_ROUTES.USERS.BASE,
|
||||
{
|
||||
params: {
|
||||
skip: params?.skip ?? 0,
|
||||
limit: params?.limit ?? 10,
|
||||
search_term: params?.search_term,
|
||||
userName: params?.userName,
|
||||
first_name: params?.first_name,
|
||||
phone_number: params?.phone_number,
|
||||
roles: params?.roles,
|
||||
effective_status: params?.effective_status,
|
||||
sort_by: params?.sort_by,
|
||||
sort_order: params?.sort_order,
|
||||
},
|
||||
},
|
||||
});
|
||||
);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
saveUser: async (payload: UserRequest): Promise<AdministrationUser> => {
|
||||
const response = payload.id
|
||||
? await axiosClient.put<AdministrationUser>(API_ROUTES.USERS.BASE, payload)
|
||||
: await axiosClient.post<AdministrationUser>(API_ROUTES.USERS.BASE, payload);
|
||||
? await axiosClient.put<AdministrationUser>(
|
||||
API_ROUTES.USERS.BASE,
|
||||
payload,
|
||||
)
|
||||
: await axiosClient.post<AdministrationUser>(
|
||||
API_ROUTES.USERS.BASE,
|
||||
payload,
|
||||
);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
@@ -32,9 +46,12 @@ export const userService = {
|
||||
id: number,
|
||||
status: 'active' | 'inactive',
|
||||
): Promise<AdministrationUser> => {
|
||||
const response = await axiosClient.patch<AdministrationUser>(API_ROUTES.USERS.STATUS(id), {
|
||||
status,
|
||||
});
|
||||
const response = await axiosClient.patch<AdministrationUser>(
|
||||
API_ROUTES.USERS.STATUS(id),
|
||||
{
|
||||
status,
|
||||
},
|
||||
);
|
||||
return response.data;
|
||||
},
|
||||
};
|
||||
|
||||
@@ -54,11 +54,15 @@ export const videoService = {
|
||||
* Upload a video for processing
|
||||
*/
|
||||
uploadVideo: async (formData: FormData): Promise<any> => {
|
||||
const response = await axiosClient.post(API_ROUTES.VIDEOS.UPLOAD, formData, {
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data',
|
||||
const response = await axiosClient.post(
|
||||
API_ROUTES.VIDEOS.UPLOAD,
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data',
|
||||
},
|
||||
},
|
||||
});
|
||||
);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
|
||||
@@ -35,9 +35,15 @@ axiosClient.interceptors.response.use(
|
||||
const status = error?.response?.status;
|
||||
const requestUrl = originalRequest?.url ?? '';
|
||||
const isAuthRoute =
|
||||
requestUrl.includes('api/auth/login') || requestUrl.includes('api/auth/refresh');
|
||||
requestUrl.includes('api/auth/login') ||
|
||||
requestUrl.includes('api/auth/refresh');
|
||||
|
||||
if (status === 401 && originalRequest && !originalRequest._retry && !isAuthRoute) {
|
||||
if (
|
||||
status === 401 &&
|
||||
originalRequest &&
|
||||
!originalRequest._retry &&
|
||||
!isAuthRoute
|
||||
) {
|
||||
originalRequest._retry = true;
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user