feat: update articles
This commit is contained in:
parent
0c1413a0b4
commit
c2447e619f
|
|
@ -1,2 +1,3 @@
|
|||
/vendor
|
||||
debug.log
|
||||
.idea
|
||||
|
|
@ -205,7 +205,7 @@ func (_i *advertisementController) Update(c *fiber.Ctx) error {
|
|||
// @Tags Advertisement
|
||||
// @Security Bearer
|
||||
// @Param id path int true "Advertisement ID"
|
||||
// @Param isPublish path bool true "Advertisement Publish Status"
|
||||
// @Param isPublish query bool true "Advertisement Publish Status"
|
||||
// @Success 200 {object} response.Response
|
||||
// @Failure 400 {object} response.BadRequestError
|
||||
// @Failure 401 {object} response.UnauthorizedError
|
||||
|
|
@ -217,7 +217,7 @@ func (_i *advertisementController) UpdatePublish(c *fiber.Ctx) error {
|
|||
return err
|
||||
}
|
||||
|
||||
isPublish, err := strconv.ParseBool(c.Params("isPublish"))
|
||||
isPublish, err := strconv.ParseBool(c.Query("isPublish"))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ func (_i *articlesController) Update(c *fiber.Ctx) error {
|
|||
// @Tags Articles
|
||||
// @Security Bearer
|
||||
// @Param id path int true "Articles ID"
|
||||
// @Param isBanner path bool true "Articles Banner Status"
|
||||
// @Param isBanner query bool true "Articles Banner Status"
|
||||
// @Success 200 {object} response.Response
|
||||
// @Failure 400 {object} response.BadRequestError
|
||||
// @Failure 401 {object} response.UnauthorizedError
|
||||
|
|
@ -219,7 +219,7 @@ func (_i *articlesController) UpdateBanner(c *fiber.Ctx) error {
|
|||
return err
|
||||
}
|
||||
|
||||
isBanner, err := strconv.ParseBool(c.Params("isBanner"))
|
||||
isBanner, err := strconv.ParseBool(c.Query("isBanner"))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -518,7 +518,7 @@ const docTemplate = `{
|
|||
"type": "boolean",
|
||||
"description": "Advertisement Publish Status",
|
||||
"name": "isPublish",
|
||||
"in": "path",
|
||||
"in": "query",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
|
|
@ -3287,7 +3287,7 @@ const docTemplate = `{
|
|||
"type": "boolean",
|
||||
"description": "Articles Banner Status",
|
||||
"name": "isBanner",
|
||||
"in": "path",
|
||||
"in": "query",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
|
|
|
|||
|
|
@ -507,7 +507,7 @@
|
|||
"type": "boolean",
|
||||
"description": "Advertisement Publish Status",
|
||||
"name": "isPublish",
|
||||
"in": "path",
|
||||
"in": "query",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
|
|
@ -3276,7 +3276,7 @@
|
|||
"type": "boolean",
|
||||
"description": "Articles Banner Status",
|
||||
"name": "isBanner",
|
||||
"in": "path",
|
||||
"in": "query",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
|
|
|
|||
|
|
@ -1327,7 +1327,7 @@ paths:
|
|||
required: true
|
||||
type: integer
|
||||
- description: Advertisement Publish Status
|
||||
in: path
|
||||
in: query
|
||||
name: isPublish
|
||||
required: true
|
||||
type: boolean
|
||||
|
|
@ -3074,7 +3074,7 @@ paths:
|
|||
required: true
|
||||
type: integer
|
||||
- description: Articles Banner Status
|
||||
in: path
|
||||
in: query
|
||||
name: isBanner
|
||||
required: true
|
||||
type: boolean
|
||||
|
|
|
|||
Loading…
Reference in New Issue