Working version

This commit is contained in:
Niklas Fondberg
2021-04-06 14:53:20 +02:00
parent 4532fbc853
commit 813f4c8e47
8 changed files with 104 additions and 15 deletions
+4 -7
View File
@@ -26,7 +26,7 @@ interface Order {
exchangeRate: number;
exchangeRateEur: number;
invoiceId: string;
contractCustomerId: number;
contractCustomerId: number | null;
vatNumber: string;
comment: string;
cancelsOrderId: number;
@@ -71,15 +71,12 @@ export class OrderAPI extends SQLDataSource {
];
}
async getOrder(id: number) {
const data = await this.knex
async getOrder(id: number): Promise<Order> {
return await this.knex
.select('*')
.from('orders')
.where('id', id)
.first()
.cache(MINUTE);
console.log(data);
return { id: 2, countryCode: 'DK' };
}
}