update category
This commit is contained in:
parent
99aa77e60a
commit
0f46937b14
|
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue