def on_get(self, req, resp, algorithm_id):
"""Shows the representation of the selected algorithm
:param int algorithm_id: The id of the algorithm
"""
algorithm_dao = data_access.AlgorithmDAO()
algorithm, err = algorithm_dao.get_algorithm_by_id(algorithm_id)
if algorithm is None:
raise falcon.HTTPNotFound(message=str(err))
resp.body = json.dumps(algorithm)
resp.content_type = 'application/json'
resp.status = falcon.HTTP_200
评论列表
文章目录