aboutsummaryrefslogtreecommitdiff
path: root/api/user/avatar.py
diff options
context:
space:
mode:
authorlonkaars <l.leblansch@gmail.com>2021-04-15 15:14:44 +0200
committerlonkaars <l.leblansch@gmail.com>2021-04-15 15:14:44 +0200
commitcc53f217f6122151bcae131a42da8f8887f8560d (patch)
tree2d09b9fd3758cecc00626c8aac31510dee7a37af /api/user/avatar.py
parentc5f71bc38772dedb033258416e0cd722f7b9e7af (diff)
new valid and util module, more function decorators
Diffstat (limited to 'api/user/avatar.py')
-rw-r--r--api/user/avatar.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/api/user/avatar.py b/api/user/avatar.py
index b034c3e..eebe52b 100644
--- a/api/user/avatar.py
+++ b/api/user/avatar.py
@@ -1,10 +1,10 @@
from flask import Blueprint, request, Response
from db import cursor
from auth.login_token import token_login
-from user.info import valid_user_id
from hierarchy import auth_required
from os.path import exists
from codecs import decode
+import valid
default_avatar = open("database/avatars/default.png", "rb").read()
@@ -18,7 +18,7 @@ def get_avatar():
user_id = request.args.get("id") or login
if not user_id: return "", 400
- if not valid_user_id(user_id): return "", 403
+ if not valid.user_id(user_id): return "", 403
avatar_path = f"database/avatars/{user_id}.png"
avatar = ""