diff --git a/app/module/galleries/request/galleries.request.go b/app/module/galleries/request/galleries.request.go index d00bb50..611c7d2 100644 --- a/app/module/galleries/request/galleries.request.go +++ b/app/module/galleries/request/galleries.request.go @@ -33,7 +33,7 @@ type GalleriesCreateRequest struct { Title string `json:"title" validate:"required"` Description *string `json:"description"` ThumbnailPath *string `json:"thumbnail_path"` - Category string `form:"category" json:"category" validate:"required"` + Category string `json:"category" validate:"required"` } @@ -42,6 +42,7 @@ func (req GalleriesCreateRequest) ToEntity() *entity.Galleries { Title: req.Title, Description: req.Description, ThumbnailPath: req.ThumbnailPath, + Category: req.Category, } } @@ -49,7 +50,7 @@ type GalleriesUpdateRequest struct { Title *string `json:"title"` Description *string `json:"description"` ThumbnailPath *string `json:"thumbnail_path"` - Category string `form:"category" json:"category" validate:"required"` + Category string `json:"category" validate:"required"` IsActive *bool `json:"is_active"` } @@ -60,6 +61,7 @@ func (req GalleriesUpdateRequest) ToEntity() *entity.Galleries { Title: getStringValue(req.Title), Description: req.Description, ThumbnailPath: req.ThumbnailPath, + Category: req.Category, IsActive: req.IsActive, } }