Complete //todo's

This commit is contained in:
simon987
2019-02-25 18:45:46 -05:00
parent 3415f95337
commit df7f91a475
5 changed files with 9 additions and 5 deletions

View File

@@ -158,7 +158,13 @@ func (api *WebAPI) GetManagerList(r *Request) {
func (api *WebAPI) GetManagerListWithRoleOn(r *Request) {
pid, err := strconv.ParseInt(r.Ctx.UserValue("id").(string), 10, 64)
handleErr(err, r) //todo handle invalid id
if err != nil || pid <= 0 {
r.Json(JsonResponse{
Ok: false,
Message: "Invalid project id",
}, 400)
return
}
sess := api.Session.StartFasthttp(r.Ctx)
manager := sess.Get("manager")