Skip to content

Commit

Permalink
feat: allow adding a comment on confirm registration
Browse files Browse the repository at this point in the history
  • Loading branch information
naftis committed Dec 11, 2024
1 parent dcc7949 commit 338eeca
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/server/src/opencrvs-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export class OpenCRVSError extends Error {
}

/** Communicates with opencrvs-core's GraphQL gateway */
const post = async <T = any>({
const post = async ({
query,
variables,
headers,
Expand All @@ -35,18 +35,20 @@ const post = async <T = any>({
);
}

return response.json() as Promise<{ data: T }>;
return response;
};

export const confirmRegistration = (
{
id,
identifiers,
registrationNumber,
comment,
}: {
id: string;
identifiers: Array<{ type: string; value: string }>;
identifiers?: Array<{ type: string; value: string }>;
registrationNumber: string;
comment?: string;
},
{ headers }: { headers: Record<string, any> }
) =>
Expand All @@ -64,6 +66,7 @@ export const confirmRegistration = (
details: {
identifiers,
registrationNumber,
comment,
},
},
headers,
Expand Down

0 comments on commit 338eeca

Please sign in to comment.