mirror of
https://github.com/DarkflameUniverse/NexusDashboard.git
synced 2024-11-24 22:47:26 +00:00
make key appear in flash if making a single key
This commit is contained in:
parent
8e58b0bc1f
commit
33d24745e1
@ -114,6 +114,7 @@ class PlayKey(db.Model):
|
||||
)
|
||||
db.session.add(new_key)
|
||||
db.session.commit()
|
||||
return key
|
||||
|
||||
def delete(self):
|
||||
db.session.delete(self)
|
||||
|
@ -20,9 +20,9 @@ def index():
|
||||
@login_required
|
||||
@gm_level(9)
|
||||
def create(count=1, uses=1):
|
||||
PlayKey.create(count=count, uses=uses)
|
||||
key = PlayKey.create(count=count, uses=uses)
|
||||
log_audit(f"Created {count} Play Key(s) with {uses} uses!")
|
||||
flash(f"Created {count} Play Key(s) with {uses} uses!", "success")
|
||||
flash(f"Created {count} Play Key(s) with {uses} uses! {key}", "success")
|
||||
return redirect(url_for('play_keys.index'))
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user