DEBUG
This commit is contained in:
@@ -19,29 +19,3 @@ pool = PooledDB(
|
|||||||
database=MYSQL_NAME,
|
database=MYSQL_NAME,
|
||||||
charset='utf8mb4'
|
charset='utf8mb4'
|
||||||
)
|
)
|
||||||
|
|
||||||
## 创建 MySQL 连接
|
|
||||||
#def create_connection():
|
|
||||||
# return pymysql.connect(
|
|
||||||
# host=MYSQL_HOST,
|
|
||||||
# user=MYSQL_USER,
|
|
||||||
# port=MYSQL_PORT, # 应该使用 MYSQL_PORT 而不是 MYSQL_HOST
|
|
||||||
# password=MYSQL_PASS,
|
|
||||||
# database=MYSQL_NAME,
|
|
||||||
# local_infile=True,
|
|
||||||
# cursorclass=pymysql.cursors.DictCursor
|
|
||||||
# )
|
|
||||||
#
|
|
||||||
## 连接 MySQL (开启 MySQL 服务)
|
|
||||||
#conn = create_connection()
|
|
||||||
#
|
|
||||||
## 获取 MySQL 连接
|
|
||||||
#def get_cursor():
|
|
||||||
# global conn
|
|
||||||
# try:
|
|
||||||
# conn.ping()
|
|
||||||
# return conn.cursor()
|
|
||||||
# except Exception:
|
|
||||||
# conn = create_connection()
|
|
||||||
# return conn.cursor()
|
|
||||||
#
|
|
@@ -72,6 +72,7 @@ def get_image_type_thumbnail(type:str, id:str, version:str, n:int, w:int, ext:st
|
|||||||
if user is None:
|
if user is None:
|
||||||
print('用户不存在:', count)
|
print('用户不存在:', count)
|
||||||
return Response('用户不存在', status_code=404)
|
return Response('用户不存在', status_code=404)
|
||||||
|
print("user:", user)
|
||||||
url = user['avatar']
|
url = user['avatar']
|
||||||
else:
|
else:
|
||||||
print('图片类型不存在:', type)
|
print('图片类型不存在:', type)
|
||||||
|
Reference in New Issue
Block a user