MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / get_projects

Function get_projects

web/pgadmin/misc/cloud/google/__init__.py:190–200  ·  view source on GitHub ↗

Lists the projects for authorized user :return: list of projects

()

Source from the content-addressed store, hash-verified

188 methods=['GET'], endpoint='projects')
189@pga_login_required
190def get_projects():
191 """
192 Lists the projects for authorized user
193 :return: list of projects
194 """
195 google_obj = _get_google_from_session()
196 if google_obj is not None:
197 projects_list, error = google_obj.get_projects()
198 if error:
199 return bad_request(errormsg=sanitize_external_text(error))
200 return make_json_response(data=projects_list)
201
202
203@blueprint.route('/regions/<project_id>',

Callers

nothing calls this directly

Calls 5

bad_requestFunction · 0.90
sanitize_external_textFunction · 0.90
make_json_responseFunction · 0.90
_get_google_from_sessionFunction · 0.85
get_projectsMethod · 0.80

Tested by

no test coverage detected