master
Aevann1 2021-08-22 19:32:14 +02:00
parent 8aee250116
commit 4d13606613
1 changed files with 16 additions and 0 deletions

View File

@ -140,8 +140,16 @@ def monthly(v):
kind=name kind=name
)) ))
text = "You were given the following awards:\n\n"
for key, value in grant_awards.items():
text += f" - **{value}** {AWARDS[key]['title']} {'Awards' if value != 1 else 'Award'}\n"
send_notification(NOTIFICATIONS_ACCOUNT, user, text)
g.db.bulk_save_objects(_awards) g.db.bulk_save_objects(_awards)
return {"message": "Monthly awards granted"} return {"message": "Monthly awards granted"}
@ -255,6 +263,14 @@ def badge_grant_post(v):
g.db.bulk_save_objects(_awards) g.db.bulk_save_objects(_awards)
text = "You were given the following awards:\n\n"
for key, value in grant_awards.items():
text += f" - **{value}** {AWARDS[key]['title']} {'Awards' if value != 1 else 'Award'}\n"
send_notification(NOTIFICATIONS_ACCOUNT, user, text)
g.db.add(user) g.db.add(user)
return redirect(user.url) return redirect(user.url)