Merge pull request 'Removed default login (fix #54)' (#133) from bugfix/remove_default_login into main

Reviewed-on: #133
This commit is contained in:
cami 2021-07-11 23:25:38 +00:00
commit 92dfa04407

View file

@ -74,17 +74,6 @@ db.init_app(app)
# Initializes CORS so that the api_tool can talk to the example app # Initializes CORS so that the api_tool can talk to the example app
cors.init_app(app) cors.init_app(app)
# Add users for the example
with app.app_context():
db.create_all()
if db.session.query(User).filter_by(username='Yasoob').count() < 1:
db.session.add(User(
username='Yasoob',
password=guard.hash_password('strongpassword'),
roles='admin'
))
db.session.commit()
@app.route('/api/login', methods=['POST']) @app.route('/api/login', methods=['POST'])
def login(): def login():