Fix iOS list response decoding to match plain-array backend responses

GET /clients and GET /projects return bare arrays, not wrapped objects.
Remove ClientListResponse and ProjectListResponse wrapper structs and
update ClientsViewModel, ProjectsViewModel, and TimerViewModel to decode
[Client] and [Project] directly.
This commit is contained in:
2026-02-19 19:05:43 +01:00
parent 48cd82ab4f
commit 39d6ea00d9
5 changed files with 4 additions and 16 deletions

View File

@@ -8,10 +8,6 @@ struct Client: Codable, Identifiable, Equatable, Hashable {
let updatedAt: String
}
struct ClientListResponse: Codable {
let clients: [Client]
}
struct CreateClientInput: Codable {
let name: String
let description: String?

View File

@@ -16,10 +16,6 @@ struct ClientReference: Codable, Equatable, Hashable {
let name: String
}
struct ProjectListResponse: Codable {
let projects: [Project]
}
struct CreateProjectInput: Codable {
let name: String
let description: String?