mirror of
https://github.com/DarkflameUniverse/NexusDashboard.git
synced 2024-11-22 05:27:25 +00:00
improve flaks/audit for pet names
This commit is contained in:
parent
26cc2d431c
commit
24a398b89c
@ -23,8 +23,8 @@ def approve_pet(id):
|
||||
pet_data = PetNames.query.filter(PetNames.id == id).first()
|
||||
|
||||
pet_data.approved = 2
|
||||
log_audit(f"Approved pet name {pet_data.pet_name}")
|
||||
flash(f"Approved pet name {pet_data.pet_name}", "success")
|
||||
log_audit(f"Approved pet name {pet_data.pet_name} from {pet_data.owner.name}")
|
||||
flash(f"Approved pet name {pet_data.pet_name} from {pet_data.owner.name}", "success")
|
||||
pet_data.save()
|
||||
return redirect(request.referrer if request.referrer else url_for("main.index"))
|
||||
|
||||
@ -37,8 +37,8 @@ def reject_pet(id):
|
||||
pet_data = PetNames.query.filter(PetNames.id == id).first()
|
||||
|
||||
pet_data.approved = 0
|
||||
log_audit(f"Rejected pet name {pet_data.pet_name}")
|
||||
flash(f"Rejected pet name {pet_data.pet_name}", "danger")
|
||||
log_audit(f"Rejected pet name {pet_data.pet_name} from {pet_data.owner.name}")
|
||||
flash(f"Rejected pet name {pet_data.pet_name} from {pet_data.owner.name}", "danger")
|
||||
pet_data.save()
|
||||
return redirect(request.referrer if request.referrer else url_for("main.index"))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user