diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 59c3ce7..514fd3e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -28,11 +28,11 @@ jobs: - name: Build project run: npm run build - # - name: Run D1 Migrations - # env: - # CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} - # CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - # run: npx wrangler d1 migrations apply pos_database --remote + - name: Run D1 Migrations + env: + CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + run: npx wrangler d1 migrations apply pos_database --remote - name: Deploy to Cloudflare Pages uses: cloudflare/pages-action@v1 diff --git a/.version b/.version index e3b86dd..ceddfb2 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -0.0.16 +0.0.15 diff --git a/functions/api/borrowed-items/index.js b/functions/api/borrowed-items/index.js index 180fda4..d216e84 100644 --- a/functions/api/borrowed-items/index.js +++ b/functions/api/borrowed-items/index.js @@ -35,7 +35,6 @@ export async function onRequestGet(context) { .bind(...params) .all(); - return Response.json(results); } catch (e) { return Response.json({ error: e.message }, { status: 500 }); diff --git a/functions/api/loans/index.js b/functions/api/loans/index.js index 15643d2..f097117 100644 --- a/functions/api/loans/index.js +++ b/functions/api/loans/index.js @@ -28,7 +28,6 @@ export async function onRequestGet(context) { .bind(...loanParams) .all(); - if (loans.length === 0) { return Response.json([]); } diff --git a/src/stores/loanStore.js b/src/stores/loanStore.js index 66b43cc..9f1cae7 100644 --- a/src/stores/loanStore.js +++ b/src/stores/loanStore.js @@ -26,7 +26,6 @@ export const useLoanStore = defineStore("loan", () => { } } - async function createLoan(loanData) { loading.value = true; try { diff --git a/src/stores/productStore.js b/src/stores/productStore.js index e7034c8..36d7068 100644 --- a/src/stores/productStore.js +++ b/src/stores/productStore.js @@ -34,7 +34,6 @@ export const useProductStore = defineStore("product", () => { queryParams.append("search", params.search); } - const queryString = queryParams.toString(); if (queryString) { url += `?${queryString}`; diff --git a/src/views/Inventory.vue b/src/views/Inventory.vue index 4814f35..38dbd87 100644 --- a/src/views/Inventory.vue +++ b/src/views/Inventory.vue @@ -115,26 +115,6 @@ - - -
@@ -213,6 +193,44 @@

Borrowed Inventory

+
+ +
+
+ + +