From 5a83cea081ef43b8ff63528acb9504c5d1b75af5 Mon Sep 17 00:00:00 2001 From: BryantHe Date: Fri, 11 Aug 2023 17:58:13 +0800 Subject: [PATCH] feat: update api --- app/util/common.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/util/common.py b/app/util/common.py index 331e371..eb5303c 100644 --- a/app/util/common.py +++ b/app/util/common.py @@ -28,9 +28,11 @@ def login_required(f): def wrapper(*args, **kwargs): token = request.headers.get("Authorization", default=None) if not token: + # TODO raise apiflask 的 json 格式的 error return '请登陆' user_id = rpc.admin.identify(token) if not user_id: + # TODO raise apiflask 的 json 格式的 error return '请登陆' session['user_id'] = user_id return f(*args, **kwargs)