Skip to content

Commit

Permalink
Merge pull request #24 from erik1110/feature/api
Browse files Browse the repository at this point in the history
[feat] give all info
  • Loading branch information
erik1110 committed Feb 5, 2024
2 parents 837adbc + f036284 commit 7ad3381
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 7ad3381

Please sign in to comment.