Removed slotmachien slack stuff
This commit is contained in:
parent
55a5c9b927
commit
56c908c63f
3 changed files with 4 additions and 9 deletions
|
@ -29,6 +29,7 @@ class LocationAdminModel(ModelBaseView):
|
|||
|
||||
admin = Admin(app, name='FoodBot', url='/admin', template_mode='bootstrap3')
|
||||
|
||||
|
||||
admin.add_view(UserAdminModel(User, db.session))
|
||||
admin.add_view(LocationAdminModel(Location, db.session))
|
||||
admin.add_view(ModelBaseView(Food, db.session))
|
||||
|
|
|
@ -8,8 +8,8 @@ feli = User()
|
|||
feli.configure("feliciaan", True, 0)
|
||||
db.session.add(feli)
|
||||
|
||||
wout = User()
|
||||
wout.configure('wout', True, 0)
|
||||
destro = User()
|
||||
destro.configure('destro', True, 0)
|
||||
|
||||
# To future developers, add yourself here
|
||||
|
||||
|
|
|
@ -65,13 +65,7 @@ def login_and_redirect_user(user):
|
|||
|
||||
def create_user(username):
|
||||
user = User()
|
||||
user.configure(username, False)
|
||||
user.configure(username, False, 1)
|
||||
db.session.add(user)
|
||||
db.session.commit()
|
||||
# EASTER EGG
|
||||
text = 'Welcome ' + username + '!'
|
||||
js = json.dumps({'text': text})
|
||||
url = app.config['SLACK_WEBHOOK']
|
||||
if len(url) > 0:
|
||||
requests.post(url, data=js)
|
||||
return user
|
||||
|
|
Loading…
Reference in a new issue