feat: update advertisement
This commit is contained in:
parent
b55f806f6b
commit
c0c35c6dd9
|
|
@ -204,6 +204,7 @@ func (_i *advertisementController) Update(c *fiber.Ctx) error {
|
||||||
// @Description API for Update Publish Advertisement
|
// @Description API for Update Publish Advertisement
|
||||||
// @Tags Advertisement
|
// @Tags Advertisement
|
||||||
// @Security Bearer
|
// @Security Bearer
|
||||||
|
// @Param Authorization header string true "Insert your access token" default(Bearer <Add access token here>)
|
||||||
// @Param id path int true "Advertisement ID"
|
// @Param id path int true "Advertisement ID"
|
||||||
// @Param isPublish query bool true "Advertisement Publish Status"
|
// @Param isPublish query bool true "Advertisement Publish Status"
|
||||||
// @Success 200 {object} response.Response
|
// @Success 200 {object} response.Response
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ func AdvertisementResponseMapper(advertisementReq *entity.Advertisement, host st
|
||||||
Placement: advertisementReq.Placement,
|
Placement: advertisementReq.Placement,
|
||||||
StatusId: advertisementReq.StatusId,
|
StatusId: advertisementReq.StatusId,
|
||||||
IsActive: advertisementReq.IsActive,
|
IsActive: advertisementReq.IsActive,
|
||||||
|
IsPublish: advertisementReq.IsPublish,
|
||||||
CreatedAt: advertisementReq.CreatedAt,
|
CreatedAt: advertisementReq.CreatedAt,
|
||||||
UpdatedAt: advertisementReq.UpdatedAt,
|
UpdatedAt: advertisementReq.UpdatedAt,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ type AdvertisementResponse struct {
|
||||||
ContentFileUrl string `json:"contentFileUrl"`
|
ContentFileUrl string `json:"contentFileUrl"`
|
||||||
Placement string `json:"placement"`
|
Placement string `json:"placement"`
|
||||||
StatusId int `json:"statusId"`
|
StatusId int `json:"statusId"`
|
||||||
|
IsPublish bool `json:"isActive"`
|
||||||
IsActive bool `json:"isActive"`
|
IsActive bool `json:"isActive"`
|
||||||
CreatedAt time.Time `json:"createdAt"`
|
CreatedAt time.Time `json:"createdAt"`
|
||||||
UpdatedAt time.Time `json:"updatedAt"`
|
UpdatedAt time.Time `json:"updatedAt"`
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue