if user does not exist, create one, and remove bundled js

This commit is contained in:
burnettk 2022-06-03 17:08:36 -04:00
parent 4c7b1e201e
commit 8ee490c29b
3 changed files with 5 additions and 1021 deletions

View File

@ -33,6 +33,11 @@ def token():
return "Not authorized"
user = UserModel.query.first()
if user is None:
user = UserModel(username="test_user1")
db.session.add(user)
db.session.commit()
auth_token = user.encode_auth_token()
return(f"auth_token: {auth_token}")

File diff suppressed because one or more lines are too long

View File

@ -16,7 +16,6 @@
<!-- modeler distro -->
<script src="https://unpkg.com/bpmn-js@9.1.0/dist/bpmn-modeler.development.js"></script>
<script src="{{ url_for('admin.static', filename='public/app.bundled.js/main.js') }}"></script>
<!-- needed for this example only -->
<script src="https://unpkg.com/jquery@3.3.1/dist/jquery.js"></script>