From cc53f217f6122151bcae131a42da8f8887f8560d Mon Sep 17 00:00:00 2001 From: lonkaars Date: Thu, 15 Apr 2021 15:14:44 +0200 Subject: new valid and util module, more function decorators --- api/user/avatar.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'api/user/avatar.py') 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 = "" -- cgit v1.2.3