refactor: 移除IP地址转换字符串的冗余操作

在多个文件中,`request.client.host` 已经是字符串类型,无需再使用 `str()` 进行转换。此次修改简化了代码,避免了不必要的类型转换操作。
This commit is contained in:
zhangtao
2025-05-18 19:37:14 +08:00
parent cc2c1931da
commit dcfdc052d0
3 changed files with 4 additions and 3 deletions
@@ -94,7 +94,7 @@ class LoginService:
name=user.name,
user_name=user.username,
ipaddr=request.client.host,
login_location=IpLocalUtil.get_ip_location(str(request.client.host)),
login_location=IpLocalUtil.get_ip_location(request.client.host),
os=user_agent.os.family,
browser = user_agent.browser.family,
login_time=user.last_login