Skip to content

Commit

Permalink
fix(server): add sort filter to resource bundle & options (#1290)
Browse files Browse the repository at this point in the history
  • Loading branch information
maslow authored Jun 20, 2023
1 parent 16bac9d commit d810000
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/src/billing/resource.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ export class ResourceService {
async findAll() {
const options = await this.db
.collection<ResourceOption>('ResourceOption')
.find()
.find({})
.sort({ createdAt: 1 })
.toArray()
return options
}
Expand Down Expand Up @@ -60,6 +61,7 @@ export class ResourceService {
const options = await this.db
.collection<ResourceBundle>('ResourceBundle')
.find()
.sort({ createdAt: 1 })
.toArray()

return options
Expand All @@ -69,6 +71,7 @@ export class ResourceService {
const options = await this.db
.collection<ResourceBundle>('ResourceBundle')
.find({ regionId })
.sort({ createdAt: 1 })
.toArray()

return options
Expand Down

0 comments on commit d810000

Please sign in to comment.