mirror of
https://github.com/simon987/task_tracker.git
synced 2025-12-14 07:19:02 +00:00
Some error handling work
This commit is contained in:
@@ -306,6 +306,13 @@ func (api *WebAPI) GetProjectList(r *Request) {
|
||||
|
||||
projects := api.Database.GetAllProjects(id)
|
||||
|
||||
if projects == nil {
|
||||
r.Json(JsonResponse{
|
||||
Ok: false,
|
||||
}, 500)
|
||||
return
|
||||
}
|
||||
|
||||
r.OkJson(JsonResponse{
|
||||
Ok: true,
|
||||
Content: GetProjectListResponse{
|
||||
|
||||
Reference in New Issue
Block a user