Return null if order was not found (#83)
This commit is contained in:
@@ -118,7 +118,9 @@ export class OrderAPI extends BaseSQLDataSource {
|
|||||||
.orderBy('id')
|
.orderBy('id')
|
||||||
.first()
|
.first()
|
||||||
.cache(MINUTE)
|
.cache(MINUTE)
|
||||||
.then((row) => this.createOrderFromRow(row));
|
.then((row) => {
|
||||||
|
return row ? this.createOrderFromRow(row) : null;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async getOrderRowFieldMapping(): Promise<any> {
|
async getOrderRowFieldMapping(): Promise<any> {
|
||||||
|
|||||||
Reference in New Issue
Block a user