refactor: IpLookup lazy load reader

This commit is contained in:
sjdonado
2025-03-23 12:24:58 +01:00
parent 0180f36a62
commit e1d3ec480d
3 changed files with 31 additions and 34 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ module App::Controllers
click = App::Models::Click.new
click.link_id = link_id
click.country = client_ip ? IpLookup.country(client_ip).try(&.code) : nil
click.country = client_ip ? IpLookup.country(client_ip) : nil
click.user_agent = user_agent_str
click.browser = ua_parser.try(&.family)
click.os = ua_parser.try(&.os.try(&.family))