From 306a72e8be57eb22b5bb1e429b33a29e2d1efa07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=BC=BA?= <1206709430@qq.com> Date: Sat, 3 Jul 2021 17:26:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=8A=9F=E8=83=BD(dvadmin):=20?= =?UTF-8?q?=E5=8F=AF=E9=85=8D=E7=BD=AE=E5=8F=96=E6=B6=88redis=EF=BC=8C?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=B8=8A=E4=BC=A0=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dvadmin-backend/apps/vadmin/utils/authentication.py | 2 +- dvadmin-backend/conf/env.example.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dvadmin-backend/apps/vadmin/utils/authentication.py b/dvadmin-backend/apps/vadmin/utils/authentication.py index 48bd86a..3187058 100644 --- a/dvadmin-backend/apps/vadmin/utils/authentication.py +++ b/dvadmin-backend/apps/vadmin/utils/authentication.py @@ -101,4 +101,4 @@ class RedisOpAuthJwtAuthentication(OpAuthJwtAuthentication): return user, token else: raise exceptions.AuthenticationFailed("登录信息失效,请重新登录!") - return None + return res diff --git a/dvadmin-backend/conf/env.example.py b/dvadmin-backend/conf/env.example.py index 8e7f4be..8671dd2 100644 --- a/dvadmin-backend/conf/env.example.py +++ b/dvadmin-backend/conf/env.example.py @@ -44,5 +44,5 @@ API_LOG_ENABLE = True API_LOG_METHODS = ['POST', 'DELETE', 'PUT'] # 'ALL' or ['POST', 'DELETE'] # 接口权限 INTERFACE_PERMISSION = True -# 是否开启 -ENABLE_LOGIN_LOCATION = False +# 是否开启登录ip转换成城市位置 +ENABLE_LOGIN_LOCATION = True