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