def test_dev_2(self): five = Processor().get_next_user({'id': 'null'}) test = Processor().swipe({ 'id': 'null', 'id_second': five[0].get('id'), 'status': True })
def profile(id_user): answer = dict() if request.method == 'PUT': answer = jsonify(Processor()) elif request.method == 'GET': answer = jsonify(Processor().profile(id_user)) return answer
def register(): if request.method == 'OPTIONS': return jsonify({}), header_option() data = {'id': check_session(request.headers)} if request.method == 'GET': return jsonify(Processor().get_profile(data)), header_option() if request.json: data.update(request.json) print(f'data = {data}') return jsonify(Processor().update_profile(data)), header_option()
def login(): if request.method == 'OPTIONS': print(request.method) return jsonify({}), header_option() data = request.json print(f'data = {data}') return jsonify(Processor().login(data)), header_option()
def swipe(): if request.method == 'OPTIONS': return jsonify({}), header_option() data = {'id': check_session(request.headers)} if request.json: data.update(request.json) return jsonify(Processor().swipe(data)), header_option()
def login(): if request.method == 'OPTIONS': print(request.method) return jsonify({}), header_option() data = {'id': check_session(request.headers)} if request.json: data.update(request.json) print(f'data = {data}') return jsonify(Processor().login(data)), header_option()
def profile(id_user): if request.method == 'OPTIONS': return make_response(jsonify({})) answer = Processor().profile(id_user) if answer: answer = answer[0] else: answer = {} return make_response(jsonify(answer))
def profile(id_user): if request.method == 'OPTIONS': print(request.method) return jsonify({}), header_option() answer = Processor().profile(id_user) if answer: answer = answer[0] else: answer = {} return jsonify(answer), header_option()
def profile_user(): if request.method == 'OPTIONS': return make_response(jsonify({})) id_user = session_to_id_user(request.headers) answer = Processor().profile(id_user) if answer: answer = answer[0] else: answer = {} return make_response(jsonify(answer))
def test_dev(self): Processor().login({ 'id': '1', 'avatar': 'https://avatars.githubusercontent.com/u/23695322?s=400&v=4', 'description': 'asdaasdsd', 'name': 'name', 'lastname': 'lastname', 'avatarThumb': 'avatarThumb', 'phone': 'phone', 'latitude': 123.123, 'longitude': 123.123, })
def login(): data = request.json return jsonify(Processor().login(data))
def all_user(): return jsonify(Processor().users()), header_option()
def register(): if request.method == 'OPTIONS': return {}, header_option() data = request.json print(f'data = {data}') return jsonify(Processor().create(data)), header_option()
def login(): if request.method == 'OPTIONS': return make_response(jsonify({})) data = request.json res = Processor().login(data) return make_response(jsonify(res))
def get_meeting(): if request.method == 'OPTIONS': return jsonify({}), header_option() data = {'id': check_session(request.headers)} return jsonify(Processor().get_meeting(data)), header_option()
def register(): if request.method == 'OPTIONS': return make_response(jsonify({})) data = request.json res = Processor().create(data) return make_response(jsonify(res))
def register(): data = request.json return jsonify(Processor().create(data))
def all_user(): return make_response(jsonify(Processor().users()))
def test_dev_3(self): pprint(Processor().get_meeting({ 'id': '4', }))