mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Refactor reportUrl to reportURL.
This commit is contained in:
@@ -89,7 +89,7 @@ class BugReportScreenViewModel: BugReportScreenViewModelType, BugReportScreenVie
|
||||
switch await bugReportService.submitBugReport(bugReport,
|
||||
progressListener: progressSubject) {
|
||||
case .success(let response):
|
||||
MXLog.info("Submission uploaded to: \(response.reportUrl)")
|
||||
MXLog.info("Submission uploaded: \(response.reportURL ?? "The server didn't generate a report URL")")
|
||||
actionsSubject.send(.submitFinished)
|
||||
case .failure(let error):
|
||||
MXLog.error("Submission failed: \(error)")
|
||||
|
||||
@@ -137,7 +137,6 @@ class BugReportService: NSObject, BugReportServiceProtocol {
|
||||
|
||||
// Parse the JSON data
|
||||
let decoder = JSONDecoder()
|
||||
decoder.keyDecodingStrategy = .convertFromSnakeCase
|
||||
let uploadResponse = try decoder.decode(SubmitBugReportResponse.self, from: data)
|
||||
|
||||
lastCrashEventID = nil
|
||||
|
||||
@@ -22,7 +22,11 @@ struct BugReport: Equatable {
|
||||
}
|
||||
|
||||
struct SubmitBugReportResponse: Decodable {
|
||||
var reportUrl: String?
|
||||
var reportURL: String?
|
||||
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case reportURL = "report_url"
|
||||
}
|
||||
}
|
||||
|
||||
enum BugReportServiceError: LocalizedError {
|
||||
|
||||
Reference in New Issue
Block a user