This commit is contained in:
Karol Wypchlo 2021-02-22 18:55:17 +01:00
parent 3a14b5d470
commit 22f97032f1
1 changed files with 2 additions and 2 deletions

View File

@ -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 };