@foxiko/client
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -15,4 +15,4 @@ const {Invoice} = require("../entities/Invoice"); | ||
get(id) { | ||
let result = this.#request.request(this.#oAuthClient, { | ||
async get(id) { | ||
let result = JSON.parse(await this.#request.request(this.#oAuthClient, { | ||
url: `https://api.foxiko.com/v1/finance/invoice/get?id=${encodeURIComponent(id)}`, | ||
@@ -22,4 +22,4 @@ headers: { | ||
} | ||
}); | ||
if(result['valid']) { | ||
})); | ||
if(result['invoice'] !== undefined) { | ||
let data = result['invoice']; | ||
@@ -26,0 +26,0 @@ data.items = result['items']; |
{ | ||
"name": "@foxiko/client", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
24434