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

Function project_list_super_admin_api

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

Source from the content-addressed store, hash-verified

69 methods = ['POST'])
70@Super_Admin.is_super()
71def project_list_super_admin_api():
72 # Could put other search options here...
73 spec_list = [
74 {"limit": {
75 'kind': int,
76 'default': 25
77 }
78 }]
79
80 log, input, untrusted_input = regular_input.master(request = request,
81 spec_list = spec_list)
82 if len(log["error"].keys()) >= 1:
83 return jsonify(log = log), 400
84
85 with sessionMaker.session_scope() as session:
86
87 project_list = Project.list(
88 mode = "super_admin",
89 session = session,
90 limit = input['limit']
91 )
92
93 out_list = []
94
95 for project in project_list:
96
97 out_list.append(project.serialize(session))
98
99 log['success'] = True
100 return jsonify(log = log,
101 project_list = out_list), 200

Callers

nothing calls this directly

Calls 2

listMethod · 0.45
serializeMethod · 0.45

Tested by

no test coverage detected