@moonbase.sh/storefront-api 0.1.89 → 0.1.91
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +3 -2
- package/dist/index.js +3 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -421,7 +421,7 @@ var LicenseEndpoints = class {
|
|
|
421
421
|
return paged(activationSchema).parse(response);
|
|
422
422
|
}
|
|
423
423
|
async revokeActivation(licenseId, activationId) {
|
|
424
|
-
await this.api.authenticatedFetch(`/api/customer/licenses/${licenseId}/activations/${activationId}/revoke
|
|
424
|
+
await this.api.authenticatedFetch(`/api/customer/licenses/${licenseId}/activations/${activationId}/revoke`, "POST");
|
|
425
425
|
}
|
|
426
426
|
};
|
|
427
427
|
|
|
@@ -583,7 +583,8 @@ var MoonbaseApi = class {
|
|
|
583
583
|
});
|
|
584
584
|
if (response.status >= 400)
|
|
585
585
|
await handleResponseProblem(response);
|
|
586
|
-
|
|
586
|
+
const contentLength = Number(response.headers.get("Content-Length")) || 0;
|
|
587
|
+
return contentLength > 0 ? await response.json() : null;
|
|
587
588
|
}
|
|
588
589
|
};
|
|
589
590
|
|
package/dist/index.js
CHANGED
|
@@ -376,7 +376,7 @@ var LicenseEndpoints = class {
|
|
|
376
376
|
return paged(activationSchema).parse(response);
|
|
377
377
|
}
|
|
378
378
|
async revokeActivation(licenseId, activationId) {
|
|
379
|
-
await this.api.authenticatedFetch(`/api/customer/licenses/${licenseId}/activations/${activationId}/revoke
|
|
379
|
+
await this.api.authenticatedFetch(`/api/customer/licenses/${licenseId}/activations/${activationId}/revoke`, "POST");
|
|
380
380
|
}
|
|
381
381
|
};
|
|
382
382
|
|
|
@@ -538,7 +538,8 @@ var MoonbaseApi = class {
|
|
|
538
538
|
});
|
|
539
539
|
if (response.status >= 400)
|
|
540
540
|
await handleResponseProblem(response);
|
|
541
|
-
|
|
541
|
+
const contentLength = Number(response.headers.get("Content-Length")) || 0;
|
|
542
|
+
return contentLength > 0 ? await response.json() : null;
|
|
542
543
|
}
|
|
543
544
|
};
|
|
544
545
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moonbase.sh/storefront-api",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.91",
|
|
5
5
|
"description": "Package to let you build storefronts with Moonbase.sh as payment and delivery provider",
|
|
6
6
|
"author": "Tobias Lønnerød Madsen <m@dsen.tv>",
|
|
7
7
|
"license": "MIT",
|