Skip to content

Commit

Permalink
Fix typing
Browse files Browse the repository at this point in the history
  • Loading branch information
timvanoostrom committed Jan 9, 2025
1 parent c43a05a commit 966991a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/server/services/decos/decos-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ async function transformDecosZaakResponse<
decosZaakTransformer.fetchWorkflowStatusDatesFor.map(
({ status, stepTitle }) => ({
status,
datePublished: workFlowDates.content[stepTitle],
datePublished: workFlowDates.content?.[stepTitle] ?? null,
})
);
}
Expand Down Expand Up @@ -447,7 +447,7 @@ export async function fetchDecosWorkflowDates(
requestID: RequestID,
zaakID: DecosZaakBase['key'],
stepTitles: DecosWorkflowStepTitle[]
): Promise<ApiResponse<Record<string, DecosWorkflowStepDate | null>>> {
): Promise<ApiResponse<Record<string, DecosWorkflowStepDate | null> | null>> {
const apiConfigWorkflows = getApiConfig('DECOS_API', {
formatUrl: (config) => {
return `${config.url}/items/${zaakID}/workflows`;
Expand Down
2 changes: 1 addition & 1 deletion src/server/services/decos/decos-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export type DecosTransformerOptions<T extends DecosZaakBase = DecosZaakBase> = {
decosZaakTransformer?: DecosZaakTransformer<T>;
fetchDecosWorkflowDates?: (
stepTitles: DecosWorkflowStepTitle[]
) => Promise<ApiResponse<Record<string, string | null>>>;
) => Promise<ApiResponse<Record<string, string | null> | null>>;
};

export type DecosZaakTransformer<T extends DecosZaakBase> = {
Expand Down

0 comments on commit 966991a

Please sign in to comment.