invoices
This commit is contained in:
parent
3a14b5d470
commit
22f97032f1
|
@ -8,7 +8,7 @@ const client = new Client({
|
||||||
|
|
||||||
const api = {
|
const api = {
|
||||||
GET: async (req, res) => {
|
GET: async (req, res) => {
|
||||||
const user = req.headers["x-user"];
|
const user = "NBE7TRXZPGZXNBD64JB6DR5AGR"; // req.headers["x-user"];
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// get locations for invoices search query
|
// get locations for invoices search query
|
||||||
|
@ -17,7 +17,7 @@ const api = {
|
||||||
|
|
||||||
// create invoices serach query
|
// create invoices serach query
|
||||||
const locationIds = locations.map(({ id }) => id);
|
const locationIds = locations.map(({ id }) => id);
|
||||||
const customerIds = [user, "NBE7TRXZPGZXNBD64JB6DR5AGR"].filter(Boolean);
|
const customerIds = [user];
|
||||||
const filter = { locationIds, customerIds };
|
const filter = { locationIds, customerIds };
|
||||||
const sort = { field: "INVOICE_SORT_DATE", order: "DESC" };
|
const sort = { field: "INVOICE_SORT_DATE", order: "DESC" };
|
||||||
const query = { filter, sort };
|
const query = { filter, sort };
|
||||||
|
|
Reference in New Issue