Skip to content

A continuation of HomeBox the inventory and organization system built for the Home User

ProductBarcode: add frontend API call utils

Crumb Owl0e1e5ae3f08b
diff --git a/frontend/lib/api/classes/actions.ts b/frontend/lib/api/classes/actions.ts
index 21466304..1a8f94bc 100644
--- a/frontend/lib/api/classes/actions.ts
+++ b/frontend/lib/api/classes/actions.ts
@@ -1,5 +1,5 @@
import { BaseAPI, route } from "../base";
-import type { ActionAmountResult } from "../types/data-contracts";
+import type { ActionAmountResult, ItemCreate } from "../types/data-contracts";
export class ActionsAPI extends BaseAPI {
ensureAssetIDs() {
@@ -31,4 +31,8 @@ export class ActionsAPI extends BaseAPI {
url: route("/actions/create-missing-thumbnails"),
});
}
+
+ getEAN(productEAN: string) {
+ return this.http.get<ItemCreate>({ url: route(`/getproductfromean`, { productEAN }) });
+ }
}