Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Commit

Permalink
Merge pull request #275 from tiki/release/pilot
Browse files Browse the repository at this point in the history
Release: pilot
  • Loading branch information
mike-audi authored Oct 3, 2023
2 parents a90089e + 817e9f7 commit 77fa3f2
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 38 deletions.
4 changes: 2 additions & 2 deletions example/ios/App/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ PODS:
- CapacitorCordova (5.4.1)
- CapacitorPreferences (5.0.6):
- Capacitor
- MytikiCaptureReceiptCapacitor (0.6.0):
- MytikiCaptureReceiptCapacitor (0.6.2):
- Capacitor
- MytikiTikiSdkCapacitor (0.3.1):
- Capacitor
Expand Down Expand Up @@ -32,7 +32,7 @@ SPEC CHECKSUMS:
Capacitor: 4c0681b47eebeba1f902093d24149cf2f518393e
CapacitorCordova: 1222fdd78bfd0d323cc22bf254eed1484fe6c92a
CapacitorPreferences: f03954bcb0ff09c792909e46bff88e3183c16b10
MytikiCaptureReceiptCapacitor: 1cdd272536280411e36d3c6e42d0c1cd7a5cff44
MytikiCaptureReceiptCapacitor: aa1e9da282a17da9a47243037fafc640713fafac
MytikiTikiSdkCapacitor: 7fb71c6099dd3bba5c75ee7ec1dd30bd90c78c9c

PODFILE CHECKSUM: f1577cba99d1d91b705cb25d5cc74e6dbaef78e1
Expand Down
16 changes: 8 additions & 8 deletions example/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@capacitor/android": "^5.3.0",
"@capacitor/core": "^5.4.1",
"@capacitor/ios": "^5.4.1",
"@mytiki/capture-receipt-capacitor": "^0.6.0",
"@mytiki/capture-receipt-capacitor": "^0.6.2",
"@mytiki/receipt-capacitor": "file:../",
"@mytiki/tiki-sdk-capacitor": "^0.3.1",
"@capacitor/preferences": "^5.0.6",
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mytiki/receipt-capacitor",
"version": "0.3.0",
"version": "0.4.0",
"description": "The TIKI Receipt library adds to your Vue.js + Capacitor mobile app a Data Reward program for your users to share their receipts in-exchange for loyalty points.",
"author": "Tiki inc.",
"license": "MIT",
Expand Down Expand Up @@ -41,7 +41,7 @@
],
"dependencies": {
"@capacitor/preferences": "^5.0.6",
"@mytiki/capture-receipt-capacitor": "^0.6.0",
"@mytiki/capture-receipt-capacitor": "^0.6.2",
"@mytiki/tiki-sdk-capacitor": "^0.3.1",
"vue": "^3.3.4",
"vue-markdown-render": "^2.0.1",
Expand Down Expand Up @@ -75,7 +75,7 @@
"@capacitor/core": "^5.4.1",
"@capacitor/ios": "^5.4.1",
"@capacitor/preferences": "^5.0.6",
"@mytiki/capture-receipt-capacitor": "^0.6.0",
"@mytiki/capture-receipt-capacitor": "^0.6.2",
"@mytiki/tiki-sdk-capacitor": "^0.3.1",
"vue": "^3.3.4",
"vue3-touch-events": "^4.1.3"
Expand Down
33 changes: 16 additions & 17 deletions src/service/publish/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,25 +154,24 @@ export class ServicePublish {
return receipts;
}

async publish(receipt: Receipt): Promise<void> {
async publish(_receipt: Receipt): Promise<void> {
const license = await this.getLicense();
if (!license) throw Error("Publish requires a valid data license.");

const jwt: Jwt = await this.plugin.token();
const rsp = await fetch(
"https://ingest.mytiki.com/api/latest/microblink-receipt",
{
method: "POST",
headers: {
Authorization: `Bearer ${jwt.accessToken}`,
},
body: JSON.stringify(receipt),
},
);
if (!rsp.ok) {
const body = await rsp.text();
console.debug(`Unsupported receipt. Skipping. ${body}`);
}
const _jwt: Jwt = await this.plugin.token();
// const rsp = await fetch(
// "https://ingest.mytiki.com/api/latest/microblink-receipt",
// {
// method: "POST",
// headers: {
// Authorization: `Bearer ${jwt.accessToken}`,
// },
// body: JSON.stringify(receipt),
// },
// );
// if (!rsp.ok) {
// const body = await rsp.text();
// console.debug(`Unsupported receipt. Skipping. ${body}`);
// }
}

async balance(): Promise<number> {
Expand Down

0 comments on commit 77fa3f2

Please sign in to comment.