Skip to content

Commit

Permalink
fix: add 'id' field into json return on route 'api/:idRestaurant/orde…
Browse files Browse the repository at this point in the history
…rs/:idOrder'
  • Loading branch information
Xantass committed Oct 8, 2024
1 parent 7d08407 commit d39446c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/db/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export class DB {
private db: Connection;

constructor() {
const client = mongoose.createConnection(process.env.DB_URL_LOCAL, {
const client = mongoose.createConnection(process.env.DB_URL, {
serverSelectionTimeoutMS: 5000,
});
this.db = client.useDb('HelloKitchen');
Expand Down
3 changes: 2 additions & 1 deletion src/modules/orders/orders.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ export class OrdersService extends DB {
details: "$orders.food_ordered.details",
mods_ingredients: "$orders.food_ordered.mods_ingredients",
is_ready: "$orders.food_ordered.is_ready",
note: "$orders.food_ordered.note"
note: "$orders.food_ordered.note",
id: "$orders.food_ordered.id"
}
}
}
Expand Down

0 comments on commit d39446c

Please sign in to comment.