add status to invoices

This commit is contained in:
Dzmitry_Tamashevich@epam.com
2020-10-27 10:51:04 +03:00
committed by Daniel Hutzel
parent 9a63f406ec
commit 52f00c62b7
5 changed files with 23 additions and 5 deletions

View File

@@ -3,7 +3,7 @@ using {sap.capire.media.store as my} from '../db/schema';
@(requires : 'authenticated-user')
service Invoices {
@readonly
entity Invoices as projection on my.Invoices;
entity MyInvoices as projection on my.Invoices;
action invoice(tracks : array of {
ID : Integer;

View File

@@ -15,7 +15,7 @@ module.exports = async function () {
);
});
this.on("READ", "Invoices", async (req) => {
this.on("READ", "MyInvoices", async (req) => {
return await db.run(req.query.where({ customer_ID: req.user.attr.ID }));
});