From 51c481f84830a6bd96ccbde57a4b2ef25dba289f Mon Sep 17 00:00:00 2001 From: Aevann Date: Tue, 6 Feb 2024 20:36:07 +0200 Subject: [PATCH] dont generate unneeded notifs --- files/routes/oauth.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/files/routes/oauth.py b/files/routes/oauth.py index a14710a34..40a773f8c 100644 --- a/files/routes/oauth.py +++ b/files/routes/oauth.py @@ -82,14 +82,6 @@ def request_api_keys(v): new_comment.top_comment_id = new_comment.id - admin_ids = [x[0] for x in g.db.query(User.id).filter(User.admin_level >= PERMS['APPS_MODERATION'])] - - for admin_id in admin_ids: - notif = Notification(comment_id=new_comment.id, user_id=admin_id) - g.db.add(notif) - - push_notif(admin_ids, 'New notification', body, f'{SITE_FULL}/admin/apps') - return {"message": "API keys requested successfully!"}