feat: align ids to int64
This commit is contained in:
@@ -33,13 +33,13 @@ func (t *Transaction) Create(
|
||||
|
||||
// Pay for order
|
||||
//
|
||||
// @Router /v1/orders/:id/pay [post]
|
||||
// @Router /v1/orders/:id<int>/pay [post]
|
||||
// @Summary Pay for order
|
||||
// @Description Pay for order
|
||||
// @Tags Transaction
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param id path string true "Order ID"
|
||||
// @Param id path int64 true "Order ID"
|
||||
// @Param form body dto.OrderPayForm true "Pay form"
|
||||
// @Success 200 {object} dto.OrderPayResponse
|
||||
// @Bind user local key(__ctx_user)
|
||||
@@ -48,7 +48,7 @@ func (t *Transaction) Create(
|
||||
func (t *Transaction) Pay(
|
||||
ctx fiber.Ctx,
|
||||
user *models.User,
|
||||
id string,
|
||||
id int64,
|
||||
form *dto.OrderPayForm,
|
||||
) (*dto.OrderPayResponse, error) {
|
||||
return services.Order.Pay(ctx, user.ID, id, form)
|
||||
@@ -56,21 +56,21 @@ func (t *Transaction) Pay(
|
||||
|
||||
// Check order payment status
|
||||
//
|
||||
// @Router /v1/orders/:id/status [get]
|
||||
// @Router /v1/orders/:id<int>/status [get]
|
||||
// @Summary Check order status
|
||||
// @Description Check order payment status
|
||||
// @Tags Transaction
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param id path string true "Order ID"
|
||||
// @Param id path int64 true "Order ID"
|
||||
// @Success 200 {object} dto.OrderStatusResponse
|
||||
// @Bind id path
|
||||
func (t *Transaction) Status(ctx fiber.Ctx, id string) (*dto.OrderStatusResponse, error) {
|
||||
func (t *Transaction) Status(ctx fiber.Ctx, id int64) (*dto.OrderStatusResponse, error) {
|
||||
return services.Order.Status(ctx, id)
|
||||
}
|
||||
|
||||
type WebhookForm struct {
|
||||
OrderID string `json:"order_id"`
|
||||
OrderID int64 `json:"order_id"`
|
||||
ExternalID string `json:"external_id"`
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user