chore: update eslint and prettier configuration
This commit is contained in:
@@ -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;
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user