Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Commit

Permalink
Update __init__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
tnix100 authored Nov 7, 2024
1 parent 299e4e1 commit 9b1205a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rest_api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ async def check_auth(headers: TokenHeader):
if account["ban"]["state"] == "perm_ban" or (account["ban"]["state"] == "temp_ban" and account["ban"]["expires"] > time.time()):
rdb.publish("admin", msgpack.packb({
"op": "log",
"data": f"**Banned (REST API)**\n@{account['_id']} ({account['uuid']})\nInternal username: {getattr(request, "internal_username")}\nBan: {account['ban']}"
"data": f"**Banned (REST API)**\n@{account['_id']} ({account['uuid']})\nInternal username: {getattr(request, 'internal_username')}\nBan: {account['ban']}"
}))
return {"error": True, "type": "accountBanned"}, 403
request.user = account["_id"]
Expand Down Expand Up @@ -209,4 +209,4 @@ async def not_implemented(e):
# Register blueprints
app.register_blueprint(admin_bp)
app.register_blueprint(v0, url_prefix="/v0")
app.register_blueprint(v0, url_prefix="/", name="root")
app.register_blueprint(v0, url_prefix="/", name="root")

0 comments on commit 9b1205a

Please sign in to comment.