MCPcopy
hub / github.com/diffgram/diffgram / user_exists

Function user_exists

default/methods/user/view.py:33–44  ·  view source on GitHub ↗
(email)

Source from the content-addressed store, hash-verified

31@routes.route('/api/user/exists/<string:email>', methods = ['GET'])
32@General_permissions.grant_permission_for(['allow_anonymous'])
33def user_exists(email):
34 if settings.DIFFGRAM_SYSTEM_MODE not in ['testing_e2e', 'testing', 'sandbox']:
35 return jsonify(message='Invalid System Mode'), 400
36
37 with sessionMaker.session_scope() as session:
38 user = User.get_by_email(session, email)
39 if user is None:
40 return jsonify({"none_found": True}), 400, {'ContentType': 'application/json'}
41
42 out = jsonify(found = True)
43
44 return out, 200, {'ContentType': 'application/json'}
45

Callers

nothing calls this directly

Calls 1

get_by_emailMethod · 0.80

Tested by

no test coverage detected