Some work on project actions

This commit is contained in:
simon987
2019-02-22 20:44:27 -05:00
parent 016676e0f3
commit d44b9924e7
25 changed files with 237 additions and 30 deletions

View File

@@ -148,6 +148,7 @@ type UpdateProjectRequest struct {
Public bool `json:"public"`
Hidden bool `json:"hidden"`
Chain int64 `json:"chain"`
Paused bool `json:"paused"`
}
func (req *UpdateProjectRequest) isValid() bool {
@@ -204,6 +205,9 @@ func (req *SubmitTaskRequest) IsValid() bool {
if req.Hash64 != 0 && req.UniqueString != "" {
return false
}
if req.Project == 0 {
return false
}
return true
}

View File

@@ -158,6 +158,7 @@ func (api *WebAPI) UpdateProject(r *Request) {
Public: updateReq.Public,
Hidden: updateReq.Hidden,
Chain: updateReq.Chain,
Paused: updateReq.Paused,
}
sess := api.Session.StartFasthttp(r.Ctx)
manager := sess.Get("manager")