feat: align ids to int64
This commit is contained in:
@@ -44,17 +44,17 @@ func (c *Creator) Dashboard(ctx fiber.Ctx, user *models.User) (*dto.DashboardSta
|
||||
|
||||
// Get content details for edit
|
||||
//
|
||||
// @Router /v1/creator/contents/:id [get]
|
||||
// @Router /v1/creator/contents/:id<int> [get]
|
||||
// @Summary Get content
|
||||
// @Description Get content details for edit
|
||||
// @Tags CreatorCenter
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param id path string true "Content ID"
|
||||
// @Param id path int64 true "Content ID"
|
||||
// @Success 200 {object} dto.ContentEditDTO
|
||||
// @Bind user local key(__ctx_user)
|
||||
// @Bind id path
|
||||
func (c *Creator) GetContent(ctx fiber.Ctx, user *models.User, id string) (*dto.ContentEditDTO, error) {
|
||||
func (c *Creator) GetContent(ctx fiber.Ctx, user *models.User, id int64) (*dto.ContentEditDTO, error) {
|
||||
return services.Creator.GetContent(ctx, user.ID, id)
|
||||
}
|
||||
|
||||
@@ -98,35 +98,35 @@ func (c *Creator) CreateContent(ctx fiber.Ctx, user *models.User, form *dto.Cont
|
||||
|
||||
// Update content
|
||||
//
|
||||
// @Router /v1/creator/contents/:id [put]
|
||||
// @Router /v1/creator/contents/:id<int> [put]
|
||||
// @Summary Update content
|
||||
// @Description Update content
|
||||
// @Tags CreatorCenter
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param id path string true "Content ID"
|
||||
// @Param id path int64 true "Content ID"
|
||||
// @Param form body dto.ContentUpdateForm true "Update form"
|
||||
// @Success 200 {string} string "Updated"
|
||||
// @Bind user local key(__ctx_user)
|
||||
// @Bind id path
|
||||
// @Bind form body
|
||||
func (c *Creator) UpdateContent(ctx fiber.Ctx, user *models.User, id string, form *dto.ContentUpdateForm) error {
|
||||
func (c *Creator) UpdateContent(ctx fiber.Ctx, user *models.User, id int64, form *dto.ContentUpdateForm) error {
|
||||
return services.Creator.UpdateContent(ctx, user.ID, id, form)
|
||||
}
|
||||
|
||||
// Delete content
|
||||
//
|
||||
// @Router /v1/creator/contents/:id [delete]
|
||||
// @Router /v1/creator/contents/:id<int> [delete]
|
||||
// @Summary Delete content
|
||||
// @Description Delete content
|
||||
// @Tags CreatorCenter
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param id path string true "Content ID"
|
||||
// @Param id path int64 true "Content ID"
|
||||
// @Success 200 {string} string "Deleted"
|
||||
// @Bind user local key(__ctx_user)
|
||||
// @Bind id path
|
||||
func (c *Creator) DeleteContent(ctx fiber.Ctx, user *models.User, id string) error {
|
||||
func (c *Creator) DeleteContent(ctx fiber.Ctx, user *models.User, id int64) error {
|
||||
return services.Creator.DeleteContent(ctx, user.ID, id)
|
||||
}
|
||||
|
||||
@@ -153,19 +153,19 @@ func (c *Creator) ListOrders(
|
||||
|
||||
// Process refund
|
||||
//
|
||||
// @Router /v1/creator/orders/:id/refund [post]
|
||||
// @Router /v1/creator/orders/:id<int>/refund [post]
|
||||
// @Summary Process refund
|
||||
// @Description Process refund
|
||||
// @Tags CreatorCenter
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param id path string true "Order ID"
|
||||
// @Param id path int64 true "Order ID"
|
||||
// @Param form body dto.RefundForm true "Refund form"
|
||||
// @Success 200 {string} string "Processed"
|
||||
// @Bind user local key(__ctx_user)
|
||||
// @Bind id path
|
||||
// @Bind form body
|
||||
func (c *Creator) Refund(ctx fiber.Ctx, user *models.User, id string, form *dto.RefundForm) error {
|
||||
func (c *Creator) Refund(ctx fiber.Ctx, user *models.User, id int64, form *dto.RefundForm) error {
|
||||
return services.Creator.ProcessRefund(ctx, user.ID, id, form)
|
||||
}
|
||||
|
||||
@@ -237,11 +237,11 @@ func (c *Creator) AddPayoutAccount(ctx fiber.Ctx, user *models.User, form *dto.P
|
||||
// @Tags CreatorCenter
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param id query string true "Account ID"
|
||||
// @Param id query int64 true "Account ID"
|
||||
// @Success 200 {string} string "Removed"
|
||||
// @Bind user local key(__ctx_user)
|
||||
// @Bind id query
|
||||
func (c *Creator) RemovePayoutAccount(ctx fiber.Ctx, user *models.User, id string) error {
|
||||
func (c *Creator) RemovePayoutAccount(ctx fiber.Ctx, user *models.User, id int64) error {
|
||||
return services.Creator.RemovePayoutAccount(ctx, user.ID, id)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user