mirror of
https://github.com/simon987/task_tracker.git
synced 2025-12-10 21:48:52 +00:00
Some work on project actions
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user