Skip to content

Commit

Permalink
fix: 400 Bad Request on 'Load More' button in Service Management -> A…
Browse files Browse the repository at this point in the history
…dmin board (#1175)
  • Loading branch information
ss-nikunj authored Oct 24, 2024
1 parent a9836e7 commit db441bc
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/features/adminBoard/serviceAdminBoardApiSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,13 @@ export const apiSlice = createApi({
endpoints: (builder) => ({
fetchInReviewServices: builder.query<ServiceResponse, ServiceRequestBody>({
query: (body) => {
const statusId = `&status=${body.statusId}`
const sortingType = `&sorting=${body.sortingType}`
const expr = `&serviceName=${body.expr}`
const statusId = body.statusId ? `&status=${body.statusId}` : ''
const sortingType = body.sortingType
? `&sorting=${body.sortingType}`
: ''
const expr = body.expr ? `&serviceName=${body.expr}` : ''
return {
url: `/api/services/serviceRelease/inReview?size=${PAGE_SIZE}&page=${
body.page
}${body.statusId && statusId}${body.sortingType && sortingType}${
body.expr && expr
}`,
url: `/api/services/serviceRelease/inReview?size=${PAGE_SIZE}&page=${body.page}${statusId}${sortingType}${expr}`,
}
},
}),
Expand Down

0 comments on commit db441bc

Please sign in to comment.