public JsonResult GetAllForWorkspace(string token, int workspaceId) { var user = _auth.AuthenticateForWorkspace(token, workspaceId); if (user == null) { throw new TedExeption(ExceptionCodes.Authentication); } return(Json(new { success = true, data = _repo.GetAllForWorkspace(workspaceId) })); }