Skip to content

Commit

Permalink
fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzad31 committed Oct 29, 2024
1 parent 2197a99 commit 7389615
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const deleteSyntheticsMonitorBulkRoute: SyntheticsRestApiRouteFactory<
}),
},
},
handler: async (routeContext) => {
handler: async (routeContext): Promise<any> => {
const { request } = routeContext;

const { ids: idsToDelete } = request.body || {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { DeleteParamsResponse } from '../../../../common/runtime_types';

export const deleteSyntheticsParamsRoute: SyntheticsRestApiRouteFactory<
DeleteParamsResponse[],
unknown,
{ id?: string },
unknown,
{ ids: string[] }
> = () => ({
Expand All @@ -38,11 +38,11 @@ export const deleteSyntheticsParamsRoute: SyntheticsRestApiRouteFactory<

if (ids && paramId) {
return response.badRequest({
body: `Both param id ${queryId} and body parameters cannot be provided`,
body: `Both param id and body parameters cannot be provided`,
});
}

const idsToDelete = ids ?? [queryId];
const idsToDelete = ids ?? [paramId];

if (idsToDelete.length === 0) {
return response.badRequest({
Expand Down

0 comments on commit 7389615

Please sign in to comment.