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)
 | 
					        print(str(e),flush=True)
 | 
				
			||||||
        return json.dumps({}, indent = 2).encode()
 | 
					        return json.dumps({}, indent = 2).encode()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@app.route('/api/auth/notme', method='GET')
 | 
					@app.route('/api/auth/notme', method=['OPTIONS', 'POST'])
 | 
				
			||||||
def index():
 | 
					def index():
 | 
				
			||||||
    try:
 | 
					    try:
 | 
				
			||||||
        if request.method == 'OPTIONS':
 | 
					        if request.method == 'OPTIONS':
 | 
				
			||||||
            return None
 | 
					            return None
 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
            response.content_type = 'application/json'
 | 
					            response.content_type = 'application/json'
 | 
				
			||||||
            params = {
 | 
					            params = request.json
 | 
				
			||||||
                "token" : request.query.token,
 | 
					            params["mako"   ] = {
 | 
				
			||||||
                "mako" : {
 | 
					                "email" : template_email.main(directory.page["email"], "message")
 | 
				
			||||||
                    "email" : template_email.main(directory.page["email"], "message")
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            return json.dumps(api_auth.auth().notme(params), indent = 2).encode()
 | 
					            return json.dumps(api_auth.auth().notme(params), indent = 2).encode()
 | 
				
			||||||
    except Exception as e:
 | 
					    except Exception as e:
 | 
				
			||||||
        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/verify', method='GET')
 | 
					@app.route('/api/auth/verify', method=['OPTIONS', 'POST'])
 | 
				
			||||||
def index():
 | 
					def index():
 | 
				
			||||||
    try:
 | 
					    try:
 | 
				
			||||||
        if request.method == 'OPTIONS':
 | 
					        if request.method == 'OPTIONS':
 | 
				
			||||||
            return None
 | 
					            return None
 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
            response.content_type = 'application/json'
 | 
					            response.content_type = 'application/json'
 | 
				
			||||||
            params = {
 | 
					            params = request.json
 | 
				
			||||||
                "token" : request.query.token,
 | 
					            params["mako"   ] = {
 | 
				
			||||||
                "mako" : {
 | 
					                "email" : template_email.main(directory.page["email"], "message")
 | 
				
			||||||
                    "email" : template_email.main(directory.page["email"], "message")
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            return json.dumps(api_auth.auth().verify(params), indent = 2).encode()
 | 
					            return json.dumps(api_auth.auth().verify(params), indent = 2).encode()
 | 
				
			||||||
    except Exception as e:
 | 
					    except Exception as e:
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user