From 22f97032f1fba8daa1f28977214a3e7435e947dd Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Mon, 22 Feb 2021 18:55:17 +0100 Subject: [PATCH] invoices --- packages/dashboard/src/pages/api/square/invoices.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/dashboard/src/pages/api/square/invoices.js b/packages/dashboard/src/pages/api/square/invoices.js index ee10e157..a61411a2 100644 --- a/packages/dashboard/src/pages/api/square/invoices.js +++ b/packages/dashboard/src/pages/api/square/invoices.js @@ -8,7 +8,7 @@ const client = new Client({ const api = { GET: async (req, res) => { - const user = req.headers["x-user"]; + const user = "NBE7TRXZPGZXNBD64JB6DR5AGR"; // req.headers["x-user"]; try { // get locations for invoices search query @@ -17,7 +17,7 @@ const api = { // create invoices serach query const locationIds = locations.map(({ id }) => id); - const customerIds = [user, "NBE7TRXZPGZXNBD64JB6DR5AGR"].filter(Boolean); + const customerIds = [user]; const filter = { locationIds, customerIds }; const sort = { field: "INVOICE_SORT_DATE", order: "DESC" }; const query = { filter, sort };