fix: rename serive in order detail

This commit is contained in:
morteza-mortezai
2025-09-28 12:26:36 +03:30
parent 55ef63196c
commit 7821a11b94
2 changed files with 4 additions and 4 deletions
@@ -235,7 +235,7 @@ export class AdminOrderController extends BaseController {
@ApiAuth() @ApiAuth()
@httpGet("/:orderId/user", Guard.authAdmin(), Guard.checkAdminPermissions([PermissionEnum.ORDER])) @httpGet("/:orderId/user", Guard.authAdmin(), Guard.checkAdminPermissions([PermissionEnum.ORDER]))
public async getUserOrderDetail(@requestParam("orderId") orderId: string) { public async getUserOrderDetail(@requestParam("orderId") orderId: string) {
const data = await this.orderService.getAdminUserOrderDetail(+orderId); const data = await this.orderService.getUserOrderDetailAsAdmin(+orderId);
return this.response(data); return this.response(data);
} }
@@ -245,7 +245,7 @@ export class AdminOrderController extends BaseController {
@ApiAuth() @ApiAuth()
@httpGet("/:orderId/seller", Guard.authAdmin(), Guard.checkAdminPermissions([PermissionEnum.ORDER])) @httpGet("/:orderId/seller", Guard.authAdmin(), Guard.checkAdminPermissions([PermissionEnum.ORDER]))
public async getSellerOrderDetail(@requestParam("orderId") orderId: string) { public async getSellerOrderDetail(@requestParam("orderId") orderId: string) {
const data = await this.orderService.getAdminSellerOrderDetail(+orderId); const data = await this.orderService.getSellerOrderDetailAsAdmin(+orderId);
return this.response(data); return this.response(data);
} }
} }
+2 -2
View File
@@ -323,7 +323,7 @@ class OrderService {
//####################################################### //#######################################################
//####################################################### //#######################################################
async getAdminUserOrderDetail(orderId: number) { async getUserOrderDetailAsAdmin(orderId: number) {
const { order } = await this.validateAdminUserOrder(orderId); const { order } = await this.validateAdminUserOrder(orderId);
const doc = await this.orderRepo.getUserOrderDetail(orderId, order.user._id.toString()); const doc = await this.orderRepo.getUserOrderDetail(orderId, order.user._id.toString());
@@ -334,7 +334,7 @@ class OrderService {
//####################################################### //#######################################################
//####################################################### //#######################################################
async getAdminSellerOrderDetail(orderId: number) { async getSellerOrderDetailAsAdmin(orderId: number) {
const { shopIds } = await this.validateAdminSellerOrder(orderId); const { shopIds } = await this.validateAdminSellerOrder(orderId);
const doc = await this.orderItemRepo.getSellerOrderDetailForAdminPanel(orderId, shopIds); const doc = await this.orderItemRepo.getSellerOrderDetailForAdminPanel(orderId, shopIds);