def api_init_project(): # noqa: F401 """Get info on the article""" logging.info("init project") project_name = request.form['project_name'] project_description = request.form['project_description'] project_authors = request.form['project_authors'] project_id = re.sub('[^A-Za-z0-9]+', '-', project_name).lower() try: init_project( project_id, project_name=project_name, project_description=project_description, project_authors=project_authors ) response = jsonify({ "project_id": project_id, "project_name": project_name, "project_description": project_description, "project_authors": project_authors }) except Exception as err: logging.error(err) response = jsonify(message="project-init-failure") return response, 500 return response
def api_init_project(): # noqa: F401 """Get info on the article""" project_name = request.form['name'] project_description = request.form['description'] project_authors = request.form['authors'] project_id = re.sub('[^A-Za-z0-9]+', '-', project_name).lower() project_config = init_project(project_id, project_name=project_name, project_description=project_description, project_authors=project_authors) response = jsonify(project_config) return response, 201
def api_init_project(): # noqa: F401 """Get info on the article""" project_name = request.form['name'] project_description = request.form['description'] project_authors = request.form['authors'] project_id = create_project_id(project_name) project_config = init_project(project_id, project_name=project_name, project_description=project_description, project_authors=project_authors) response = jsonify(project_config) return response, 201