fix: FeedbackView rawPost API call signature
All checks were successful
Security Checks / dependency-audit (push) Successful in 14s
Security Checks / secret-scanning (push) Successful in 3s
Security Checks / dockerfile-lint (push) Successful in 4s

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Yusuf Suleman
2026-04-03 12:55:46 -05:00
parent 687d6c5f12
commit 0bdcec7eca

View File

@@ -100,15 +100,15 @@ struct FeedbackSheet: View {
do {
let body: [String: String] = ["text": text.trimmingCharacters(in: .whitespaces), "source": "ios"]
let jsonData = try JSONSerialization.data(withJSONObject: body)
let (data, response) = try await APIClient.shared.rawPost("/api/feedback", body: jsonData)
let data = try await APIClient.shared.rawPost(path: "/api/feedback", data: jsonData)
if let httpResp = response as? HTTPURLResponse, httpResp.statusCode < 300 {
let respBody = try? JSONSerialization.jsonObject(with: data) as? [String: Any]
if respBody?["ok"] as? Bool == true {
withAnimation { sent = true }
DispatchQueue.main.asyncAfter(deadline: .now() + 1.5) {
dismiss()
}
} else {
let respBody = try? JSONSerialization.jsonObject(with: data) as? [String: Any]
error = (respBody?["error"] as? String) ?? "Failed to send"
}
} catch {