from flask import request, jsonify from database.crud import insert_data from external.twilio import send_otp from app import app @app.route("/register", methods=["POST"]) def create_user(): data = request.get_json() insert_data(schema="Users", data=data) send_otp(receiver=data["mobile"]) return jsonify("User created, pending OTP verification")