Return null if order was not found (#83)

This commit is contained in:
Niklas Fondberg
2021-10-29 15:55:28 +02:00
committed by GitHub
parent 949de5e5e5
commit 043f1455cf
+3 -1
View File
@@ -118,7 +118,9 @@ export class OrderAPI extends BaseSQLDataSource {
.orderBy('id')
.first()
.cache(MINUTE)
.then((row) => this.createOrderFromRow(row));
.then((row) => {
return row ? this.createOrderFromRow(row) : null;
});
}
async getOrderRowFieldMapping(): Promise<any> {