Skip to content

Commit

Permalink
Add dbas url to receipt call (#287)
Browse files Browse the repository at this point in the history
  • Loading branch information
av-mads authored Jan 29, 2024
1 parent 1f6c08f commit 8d1db47
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/av_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ export class AVClient implements IAVClient {
const voterAuthorizerContextUuid = this.getLatestConfig().items.voterAuthorizerConfig.content.voterAuthorizer.contextUuid;
const coordinator = new VoterAuthorizationCoordinator(coordinatorURL, voterAuthorizerContextUuid);
try {
coordinator.sendReceipt(clientReceipt, this.authorizationSessionId);
coordinator.sendReceipt(clientReceipt, this.authorizationSessionId, this.getLatestConfig().items.electionConfig.content.dbasUrl);
} catch(e) {
console.error(e)
}
Expand Down
5 changes: 3 additions & 2 deletions lib/av_client/connectors/voter_authorization_coordinator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,13 @@ export default class VoterAuthorizationCoordinator {
});
}

sendReceipt(receipt: BallotBoxReceipt, authorizationSessionId: string ): Promise<AxiosResponse> {
sendReceipt(receipt: BallotBoxReceipt, authorizationSessionId: string, dbasUrl?: string ): Promise<AxiosResponse> {
return this.backend.post('send_receipt', {
trackingCode: receipt.trackingCode,
electionContextUuid: this.electionContextUuid,
authorizationSessionId: authorizationSessionId,
receipt: receipt.receipt
receipt: receipt.receipt,
dbasUrl: dbasUrl
})
}

Expand Down
1 change: 1 addition & 0 deletions lib/av_client/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,7 @@ export interface ElectionConfigContent {
to: string
}
sendTrackingCodeByEmail?: boolean
dbasUrl?: string
}

// Genesis Config Item
Expand Down

0 comments on commit 8d1db47

Please sign in to comment.