2 Commits
0.2.0 ... 0.2.1

Author SHA1 Message Date
fde2062507 Reduce swift tools version 2022-06-09 11:38:53 +02:00
e4883f9b2b Update route 2022-06-07 17:21:47 +02:00
2 changed files with 5 additions and 3 deletions

View File

@ -1,4 +1,4 @@
// swift-tools-version: 5.6
// swift-tools-version: 5.5
import PackageDescription
@ -14,7 +14,8 @@ let package = Package(
targets: ["Push"]),
],
dependencies: [
.package(url: "https://christophhagen.de/git/ch/Push-API.git", from: "0.5.0"),
.package(url: "https://christophhagen.de/git/ch/Push-API.git", from: "0.7.2"),
.package(url: "https://github.com/kylebrowning/APNSwift.git", from: "4.0.0"),
.package(url: "https://github.com/apple/swift-crypto.git", "1.0.0" ..< "3.0.0")
],
targets: [

View File

@ -76,7 +76,8 @@ public final class PushClient {
*/
public func getUnapprovedDevices(masterKey: String) async -> [DeviceRegistration]? {
let hash = hash(masterKey)
guard let data = await post(.listUnapprovedDevices, bodyData: hash) else {
let request = AdminRequest(keyHash: hash, application: application)
guard let data = await post(.listUnapprovedDevices, body: request) else {
return nil
}
do {