mirror of
https://github.com/simon987/task_tracker.git
synced 2025-12-13 23:09:02 +00:00
some bug fixes, some optimizations
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user