put invite API in the handler
This commit is contained in:
parent
b9d0f28a76
commit
43626ebec3
16
handler.py
16
handler.py
@ -217,6 +217,22 @@ def index():
|
|||||||
print(str(e),flush=True)
|
print(str(e),flush=True)
|
||||||
return json.dumps({}, indent = 2).encode()
|
return json.dumps({}, indent = 2).encode()
|
||||||
|
|
||||||
|
@app.route('/api/auth/invite', method=['OPTIONS', 'POST'])
|
||||||
|
def index():
|
||||||
|
try:
|
||||||
|
if request.method == 'OPTIONS':
|
||||||
|
return None
|
||||||
|
else:
|
||||||
|
response.content_type = 'application/json'
|
||||||
|
params = request.json
|
||||||
|
params["mako" ] = {
|
||||||
|
"email" : template_email.main(directory.page["email"], "accept")
|
||||||
|
}
|
||||||
|
return json.dumps(api_auth.auth().forgot(params), indent = 2).encode()
|
||||||
|
except Exception as e:
|
||||||
|
print(str(e),flush=True)
|
||||||
|
return json.dumps({}, indent = 2).encode()
|
||||||
|
|
||||||
@app.route('/api/auth/login', method=['OPTIONS', 'POST'])
|
@app.route('/api/auth/login', method=['OPTIONS', 'POST'])
|
||||||
def index():
|
def index():
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user