Skip to content

Commit

Permalink
[feat] give all info
Browse files Browse the repository at this point in the history
  • Loading branch information
erik1110 committed Feb 5, 2024
1 parent ae262d2 commit f036284
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/features/order/order.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,9 @@ export class OrderService {

async getallOrders(req: Request) {
const result = await this.orderModel.find({});
const ids = result.map((order) => order._id.toString());
return getHttpResponse.successResponse({
message: '取得所有訂單',
data: ids,
data: result,
});
}

Expand All @@ -72,12 +71,10 @@ export class OrderService {
orderUserId: orderUserId,
status: 1,
},
'_id',
);
const ids = result.map((order) => order._id.toString());
return getHttpResponse.successResponse({
message: '取得所有訂單',
data: ids,
data: result,
});
}

Expand Down

0 comments on commit f036284

Please sign in to comment.