revert: fix: 尝试修复记录日志时出现的 'str' object has no attribute 'status'问题

This commit is contained in:
helloplhm-qwq 2023-12-24 10:50:55 +08:00
parent 635ae720b9
commit da0737ecfd
No known key found for this signature in database
GPG Key ID: B7542212855B2C26

View File

@ -72,7 +72,7 @@ async def handle_before_request(app, handler):
resp = await handler(request)
if (isinstance(resp, str)):
resp = Response(body = resp, content_type='text/plain', status = 200)
elif (isinstance(resp, dict):
elif (isinstance(resp, dict)):
resp = handleResult(resp)
elif (not isinstance(resp, Response)):
resp = Response(body = str(resp), content_type='text/plain', status = 200)