Skip to content

Commit

Permalink
feat(guardian-signature): correct return type
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianAndersen committed Aug 13, 2024
1 parent 4e16f3a commit 134c25d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 21 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@boklisten/bl-connect",
"version": "0.20.17",
"version": "0.20.18",
"license": "MIT",
"scripts": {
"dev": "yarn serve",
Expand Down
33 changes: 13 additions & 20 deletions src/app/document-services/signature/signature.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,21 +61,6 @@ export class SignatureService extends BlDocumentService<SerializedSignature> {
return signature.creationTime < oldestAllowedSignatureTime;
}

public async generateCustomerItemReport(options: {
branchFilter?: string[];
createdAfter?: Date;
createdBefore?: Date;
returned: boolean;
buyout: boolean;
}): Promise<unknown[]> {
return (
await this._apiService.add(
BL_CONFIG.collection.customerItem + "/generate-report",
options
)
).data;
}

public async addGuardianSignature(
customerId: string,
base64EncodedImage: string,
Expand All @@ -87,10 +72,18 @@ export class SignatureService extends BlDocumentService<SerializedSignature> {
);
}

public async checkGuardianSignature(customerId: string): Promise<void> {
await this._apiService.add(
BL_CONFIG.collection.signature + "/check-guardian-signature",
{ customerId }
);
public async checkGuardianSignature(
customerId: string
): Promise<{
message?: string;
customerNam?: string;
guardianSignatureRequired: boolean;
}> {
return (
await this._apiService.add(
BL_CONFIG.collection.signature + "/check-guardian-signature",
{ customerId }
)
).data[0];
}
}

0 comments on commit 134c25d

Please sign in to comment.