fix: restrict order status to owner
This commit is contained in:
@@ -66,10 +66,11 @@ func (t *Transaction) Pay(
|
||||
// @Produce json
|
||||
// @Param id path int64 true "Order ID"
|
||||
// @Success 200 {object} dto.OrderStatusResponse
|
||||
// @Bind user local key(__ctx_user)
|
||||
// @Bind id path
|
||||
func (t *Transaction) Status(ctx fiber.Ctx, id int64) (*dto.OrderStatusResponse, error) {
|
||||
func (t *Transaction) Status(ctx fiber.Ctx, user *models.User, id int64) (*dto.OrderStatusResponse, error) {
|
||||
tenantID := getTenantID(ctx)
|
||||
return services.Order.Status(ctx, tenantID, id)
|
||||
return services.Order.Status(ctx, tenantID, user.ID, id)
|
||||
}
|
||||
|
||||
type WebhookForm struct {
|
||||
|
||||
Reference in New Issue
Block a user