summaryrefslogtreecommitdiff
path: root/Hutch/Networking/SystemStatusService.swift
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-04-15 15:29:57 -0500
committerChristian Cleberg <[email protected]>2026-04-15 15:30:40 -0500
commit06c36c4352f47655cb39a5042a7e5fd475c118e1 (patch)
tree448054ebc937a258c694ed2338a7c2f7edbd17f2 /Hutch/Networking/SystemStatusService.swift
parent3727afa0fdb6e7b9884bbe00b9aed3e994952c5a (diff)
downloadhutch-06c36c4352f47655cb39a5042a7e5fd475c118e1.tar.gz
hutch-06c36c4352f47655cb39a5042a7e5fd475c118e1.tar.bz2
hutch-06c36c4352f47655cb39a5042a7e5fd475c118e1.zip
feat: add custom hutch user-agent to api calls
Implements: https://todo.sr.ht/~ccleberg/hutch/64
Diffstat (limited to 'Hutch/Networking/SystemStatusService.swift')
-rw-r--r--Hutch/Networking/SystemStatusService.swift9
1 files changed, 1 insertions, 8 deletions
diff --git a/Hutch/Networking/SystemStatusService.swift b/Hutch/Networking/SystemStatusService.swift
index ec2d233..35b82a1 100644
--- a/Hutch/Networking/SystemStatusService.swift
+++ b/Hutch/Networking/SystemStatusService.swift
@@ -60,14 +60,7 @@ struct SystemStatusService: Sendable {
return data
}
- private var userAgent: String {
- let bundle = Bundle.main
- let name = (bundle.object(forInfoDictionaryKey: "CFBundleDisplayName") as? String)
- ?? (bundle.object(forInfoDictionaryKey: "CFBundleName") as? String)
- ?? "Hutch"
- let version = (bundle.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String) ?? "dev"
- return "\(name)/\(version) (System Status)"
- }
+ private var userAgent: String { Bundle.main.hutchUserAgent }
}
extension SystemStatusService: SystemStatusServing {}