05/11 Update issue image upload
This commit is contained in:
@@ -194,7 +194,8 @@ actor APIClient {
|
||||
"mobile_local_id": issue.localId,
|
||||
]
|
||||
if let id = issue.inspection?.serverId { body["inspection_id"] = id }
|
||||
if let path = issue.photoServerPath { body["photo_path"] = path }
|
||||
// Send the first uploaded photo as photo_path (server Issue.photo_path is a single column)
|
||||
if let firstPhoto = issue.photoServerPaths.first { body["photo_path"] = firstPhoto }
|
||||
|
||||
struct R: Decodable, Sendable { let issueId: Int; let duplicate: Bool }
|
||||
let r: R = try await post("/api/v1/issues", body: body)
|
||||
|
||||
Reference in New Issue
Block a user