feat(medusa): Adds filtering to order listing for use in admin (#149)

This commit is contained in:
Oliver Windall Juhl
2020-12-28 16:45:02 +01:00
committed by GitHub
parent cb0fc0d475
commit 09d7ed232b
4 changed files with 956 additions and 21 deletions
+10
View File
@@ -57,6 +57,16 @@ class SwapService extends BaseService {
this.eventBus_ = eventBusService
}
/**
* @param {Object} selector - the query object for find
* @return {Promise} the result of the find operation
*/
list(selector, offset, limit) {
return this.swapModel_
.find(selector, {}, offset, limit)
.sort({ created: -1 })
}
/**
* Used to validate user ids. Throws an error if the cast fails
* @param {string} rawId - the raw user id to validate.