MCPcopy Index your code
hub / github.com/diffgram/diffgram / project_list_api

Function project_list_api

default/methods/project/project_list.py:12–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10 methods = ['POST'])
11@General_permissions.grant_permission_for(['normal_user', 'super_admin'])
12def project_list_api():
13 spec_list = [{'username': None}]
14
15 log, input, untrusted_input = regular_input.master(request = request,
16 spec_list = spec_list)
17 if len(log["error"].keys()) >= 1:
18 return jsonify(log = log), 400
19
20 with sessionMaker.session_scope() as session:
21 # TODO this is a placeholder for future thing of getting projects
22 # by username
23 # But for now default case is getting logged in users project
24 # So we just use User.get()
25
26 user = User.get(session = session)
27
28 project_list = project_list_core(session = session,
29 user = user)
30
31 log['success'] = True
32 return jsonify(log = log,
33 project_list = project_list), 200
34
35
36def project_list_core(session,

Callers

nothing calls this directly

Calls 2

project_list_coreFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected