Skip to content

Commit

Permalink
Update src/server/services/wpi/api-service.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Tim van Oostrom <[email protected]>
  • Loading branch information
janthijs and timvanoostrom authored Nov 3, 2023
1 parent 776d942 commit 740602a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/server/services/wpi/api-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,10 @@ export async function fetchStadspas(
};

// Only request aanvragen when toggle is active
const aanvragenRequest = FeatureToggle.stadspasRequestsActive
? fetchRequestProcess(
let aanvragenRequest = Promise.resolve(apiSuccessResult([]));

if (FeatureToggle.stadspasRequestsActive) {
aanvragenRequest = fetchRequestProcess(
requestID,
authProfileAndToken,
() => stadspasRequestProcessLabels,
Expand All @@ -164,9 +166,7 @@ export async function fetchStadspas(
requestCacheKey: 'fetch-aanvragen-' + requestID,
}
)
: new Promise<ApiSuccessResponse<[]>>((resolve) => {
return resolve(apiSuccessResult([]));
});
}

const stadspasRequest = requestData<WpiStadspasResponseData>(
getApiConfig('WPI_STADSPAS', {
Expand Down

0 comments on commit 740602a

Please sign in to comment.