(email)
| 31 | @routes.route('/api/user/exists/<string:email>', methods = ['GET']) |
| 32 | @General_permissions.grant_permission_for(['allow_anonymous']) |
| 33 | def 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 |
nothing calls this directly
no test coverage detected