Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.

Remove the payload binding for deployment PATCH API #211

Merged
merged 1 commit into from
Nov 7, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions internal/server/api/v1/repos/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ type (
Ref string `json:"ref"`
Env string `json:"env"`
}

deploymentPatchPayload struct {
Status string `json:"status"`
}
)

func (r *Repo) ListDeployments(c *gin.Context) {
Expand Down Expand Up @@ -157,15 +153,6 @@ func (r *Repo) UpdateDeployment(c *gin.Context) {
number = c.Param("number")
)

p := &deploymentPatchPayload{}
if err := c.ShouldBindBodyWith(p, binding.JSON); err != nil {
gb.ResponseWithError(
c,
e.NewErrorWithMessage(e.ErrorCodeInvalidRequest, "It has failed to bind the payload.", nil),
)
return
}

vu, _ := c.Get(gb.KeyUser)
u := vu.(*ent.User)

Expand Down