refactor: notifications and settings view models; enhance login and registration UI

This commit is contained in:
2026-03-15 21:40:20 +07:00
parent 0947c048c1
commit 37b87ececd
45 changed files with 985 additions and 680 deletions
+9 -2
View File
@@ -166,8 +166,8 @@ actor HTTPClient {
private init() {
#if DEBUG
ssoBaseURL = "http://localhost:8081"
notificationBaseURL = "http://localhost:8092"
ssoBaseURL = "http://192.168.3.7:8081"
notificationBaseURL = "http://192.168.3.7:8092"
#else
ssoBaseURL = "https://id.robonen.ru"
notificationBaseURL = "https://notify.robonen.ru"
@@ -254,6 +254,13 @@ actor HTTPClient {
throw APIError.serverError("HTTP \(httpResponse.statusCode)")
}
// 204 No Content return empty decodable if possible
if httpResponse.statusCode == 204 || data.isEmpty {
if let empty = EmptyResponse() as? T {
return empty
}
}
let decoder = JSONDecoder()
decoder.dateDecodingStrategy = .iso8601
do {