(project_string_id)
| 12 | Roles = ["admin", "Editor"], |
| 13 | apis_user_list = ['api_enabled_builder', 'security_email_verified']) |
| 14 | def guide_new_api(project_string_id): |
| 15 | |
| 16 | spec_list = [{"name" : str}, |
| 17 | {"description_markdown": str}] |
| 18 | |
| 19 | log, input, untrusted_input = regular_input.master(request=request, |
| 20 | spec_list=spec_list) |
| 21 | if len(log["error"].keys()) >= 1: |
| 22 | return jsonify(log=log), 400 |
| 23 | |
| 24 | with sessionMaker.session_scope() as session: |
| 25 | |
| 26 | member = get_member(session = session) |
| 27 | |
| 28 | ### MAIN ### |
| 29 | project = Project.get(session = session, |
| 30 | project_string_id = project_string_id) |
| 31 | |
| 32 | guide = guide_new_core(session = session, |
| 33 | member = member, |
| 34 | name = input['name'], |
| 35 | description_markdown = input['description_markdown'], |
| 36 | project = project) |
| 37 | ### end main ### |
| 38 | |
| 39 | log['success'] = True |
| 40 | |
| 41 | # For ID |
| 42 | session.flush() |
| 43 | |
| 44 | return jsonify(log = log, |
| 45 | guide = guide.serialize_for_list_view()), 200 |
| 46 | |
| 47 | |
| 48 | def guide_new_core(session, |
nothing calls this directly
no test coverage detected