13 lines
335 B
Python
13 lines
335 B
Python
|
from flask import request, jsonify
|
||
|
from database import register_user
|
||
|
from external.twilio import send_otp
|
||
|
from app import app
|
||
|
|
||
|
|
||
|
@app.route("/users", methods=["POST"])
|
||
|
def create_user(self):
|
||
|
data = request.get_json()
|
||
|
register_user(data)
|
||
|
send_otp(data["mobile"])
|
||
|
return jsonify("User created, pending OTP verification")
|