Change the method for notme and verify
This commit is contained in:
parent
6fd96fd7ce
commit
981192ad69
20
handler.py
20
handler.py
@ -104,36 +104,32 @@ def index():
|
||||
print(str(e),flush=True)
|
||||
return json.dumps({}, indent = 2).encode()
|
||||
|
||||
@app.route('/api/auth/notme', method='GET')
|
||||
@app.route('/api/auth/notme', method=['OPTIONS', 'POST'])
|
||||
def index():
|
||||
try:
|
||||
if request.method == 'OPTIONS':
|
||||
return None
|
||||
else:
|
||||
response.content_type = 'application/json'
|
||||
params = {
|
||||
"token" : request.query.token,
|
||||
"mako" : {
|
||||
"email" : template_email.main(directory.page["email"], "message")
|
||||
}
|
||||
params = request.json
|
||||
params["mako" ] = {
|
||||
"email" : template_email.main(directory.page["email"], "message")
|
||||
}
|
||||
return json.dumps(api_auth.auth().notme(params), indent = 2).encode()
|
||||
except Exception as e:
|
||||
print(str(e),flush=True)
|
||||
return json.dumps({}, indent = 2).encode()
|
||||
|
||||
@app.route('/api/auth/verify', method='GET')
|
||||
@app.route('/api/auth/verify', method=['OPTIONS', 'POST'])
|
||||
def index():
|
||||
try:
|
||||
if request.method == 'OPTIONS':
|
||||
return None
|
||||
else:
|
||||
response.content_type = 'application/json'
|
||||
params = {
|
||||
"token" : request.query.token,
|
||||
"mako" : {
|
||||
"email" : template_email.main(directory.page["email"], "message")
|
||||
}
|
||||
params = request.json
|
||||
params["mako" ] = {
|
||||
"email" : template_email.main(directory.page["email"], "message")
|
||||
}
|
||||
return json.dumps(api_auth.auth().verify(params), indent = 2).encode()
|
||||
except Exception as e:
|
||||
|
Loading…
Reference in New Issue
Block a user