31 lines
747 B
TypeScript
31 lines
747 B
TypeScript
/* import { getService } from "@apps/server/src/core/service-registry"; */
|
|
import { IPackageServer } from "@libs/package";
|
|
//import initInvoiceModel from './models/contact.model';
|
|
|
|
export const InvoicesPackage: IPackageServer = {
|
|
metadata: {
|
|
name: "invoices",
|
|
version: "1.0.0",
|
|
dependencies: ["contacts"],
|
|
},
|
|
init(app) {
|
|
// const contacts = getService<ContactsService>("contacts");
|
|
|
|
app.get("/invoices", (req, res) => {
|
|
// const customer = await contacts.getContactById('123');
|
|
res.send("Aquí van las facturas");
|
|
});
|
|
},
|
|
registerDependencies() {
|
|
return {
|
|
models: [
|
|
/*initInvoiceModel*/
|
|
],
|
|
services: {
|
|
getInvoice: () => {},
|
|
/*...*/
|
|
},
|
|
};
|
|
},
|
|
};
|