Ejemplo n.º 1
0
def login_route():
    print("request @login arrived...")
    content = request.get_json() #replace user with content
    response = {}
    if(vc.validateRequest(content)):
        response = Main.login(content)
    if('error' in content):
        response['error'] = content['error']
        return json.dumps(response)
    return json.dumps(response)
Ejemplo n.º 2
0
    # all SQL commands (split on ';')
    sqlCommands = sqlFile.split(';')

    for command in sqlCommands:
        try:
            db.run(command)
            print('command executed')
        except:
            print('command failed')


executeScriptsFromFile('test/no.sql')

print('************************************************')
"""~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"""

input = {}
output = Main.login(input)
print(output)

print('#######')

input = {'username': '******', 'password': '******'}
output = Main.login(input)
print(output)

print('#######')

input = {'username': '******', 'password': '******'}
output = Main.login(input)
print(output)