Update to a PUT request.

This commit is contained in:
Greyson Parrelli
2023-09-09 08:00:33 -04:00
parent 6ec00f4589
commit 4eaf9a971b
3 changed files with 7 additions and 7 deletions

View File

@@ -1229,17 +1229,17 @@ func (a *Api) QuitGroup(c *gin.Context) {
c.Status(http.StatusNoContent)
}
// @Summary Refresh the state of a Signal Group.
// @Summary Update the state of a Signal Group.
// @Tags Groups
// @Description Refresh the state of a Signal Group.
// @Description Update the state of a Signal Group.
// @Accept json
// @Produce json
// @Success 204 {string} OK
// @Failure 400 {object} Error
// @Param number path string true "Registered Phone Number"
// @Param groupid path string true "Group ID"
// @Router /v1/groups/{number}/{groupid}/refresh [post]
func (a *Api) RefreshGroup(c *gin.Context) {
// @Router /v1/groups/{number}/{groupid} [put]
func (a *Api) UpdateGroup(c *gin.Context) {
number := c.Param("number")
if number == "" {
c.JSON(400, Error{Msg: "Couldn't process request - number missing"})
@@ -1253,7 +1253,7 @@ func (a *Api) RefreshGroup(c *gin.Context) {
return
}
err = a.signalClient.RefreshGroup(number, internalGroupId)
err = a.signalClient.UpdateGroup(number, internalGroupId)
if err != nil {
c.JSON(400, Error{Msg: err.Error()})
return