This commit is contained in:
Aevann1 2021-09-17 10:55:55 +02:00
parent fdeb1e997b
commit 06669e9d4e
8 changed files with 32 additions and 40 deletions

View file

@ -130,12 +130,11 @@ def admin_app_revoke(v, aid):
if app.id:
for auth in g.db.query(ClientAuth).options(lazyload('*')).filter_by(oauth_client=app.id).all(): g.db.delete(auth)
g.db.flush()
send_notification(NOTIFICATIONS_ACCOUNT, app.author, f"Your application `{app.app_name}` has been revoked.")
g.db.delete(app)
g.db.commit()
g.db.commit()
return {"message": f"App revoked"}
@ -149,7 +148,6 @@ def admin_app_reject(v, aid):
for auth in g.db.query(ClientAuth).options(lazyload('*')).filter_by(oauth_client=app.id).all(): g.db.delete(auth)
g.db.flush()
send_notification(NOTIFICATIONS_ACCOUNT, app.author, f"Your application `{app.app_name}` has been rejected.")
g.db.delete(app)