Fix review comments

Also fix a crash on iPad.
This commit is contained in:
Doug
2022-10-05 15:51:43 +01:00
committed by Doug
parent 50d974884b
commit 86671a61cc
4 changed files with 19 additions and 15 deletions
@@ -29,3 +29,14 @@ class AuthenticatedEndpointRequest: NSObject {
super.init()
}
}
// MARK: - Helper methods
extension AuthenticatedEndpointRequest {
/// Create an authenticated request on `_matrix/client/r0/devices/{deviceID}`.
/// - Parameter deviceID: The device ID that is to be deleted.
static func deleteDevice(_ deviceID: String) -> AuthenticatedEndpointRequest {
let path = String(format: "%@/devices/%@", kMXAPIPrefixPathR0, MXTools.encodeURIComponent(deviceID))
return AuthenticatedEndpointRequest(path: path, httpMethod: "DELETE")
}
}