fix project set auto deploy

This commit is contained in:
mc0814 2023-11-02 09:48:32 +08:00
parent bc2cfdecc6
commit f3c356a830

View File

@ -597,7 +597,7 @@ func (Project) Edit(gp *server.Goploy) server.Response {
func (Project) SetAutoDeploy(gp *server.Goploy) server.Response {
type ReqData struct {
ID int64 `json:"id" validate:"required,gt=0"`
AutoDeploy uint8 `json:"autoDeploy" validate:"required,gte=0"`
AutoDeploy uint8 `json:"autoDeploy" validate:"oneof=0 1"`
}
var reqData ReqData
if err := gp.Decode(&reqData); err != nil {