some bug fixes, some optimizations

This commit is contained in:
simon987
2019-02-11 20:10:33 -05:00
parent 51eb9ae6da
commit 4edf354f8d
13 changed files with 141 additions and 61 deletions

View File

@@ -202,7 +202,15 @@ func (api *WebAPI) ProjectGet(r *Request) {
func (api *WebAPI) ProjectGetAllProjects(r *Request) {
projects := api.Database.GetAllProjects()
worker, _ := api.validateSignature(r)
var id int64
if worker == nil {
id = 0
} else {
id = worker.Id
}
projects := api.Database.GetAllProjects(id)
r.OkJson(GetAllProjectsResponse{
Ok: true,