Public init and proper doc

This commit is contained in:
Christoph Hagen 2022-06-07 17:14:20 +02:00
parent 284ff11030
commit 46a7073a04
2 changed files with 11 additions and 1 deletions

View File

@ -10,4 +10,14 @@ public struct AdminRequest: Codable {
/// The application id with which the request is associated /// The application id with which the request is associated
public let application: ApplicationId public let application: ApplicationId
/**
Create a new admin request.
- Parameter keyHash: The SHA256 hash of the admin key
- Parameter application: The application id for the request.
*/
public init(keyHash: Data, application: ApplicationId) {
self.keyHash = keyHash
self.application = application
}
} }

View File

@ -30,7 +30,7 @@ public enum Route: String {
Get a list of unapproved devices for review. Get a list of unapproved devices for review.
* HTTP Method: `POST` * HTTP Method: `POST`
* HTTP Body: The binary SHA256 hash of the master key using the custom salt * HTTP Body: An `AdminRequest` JSON object with the SHA256 hash of the admin key and the application id
* Response: An array of `DeviceRegistration` elements encoded in JSON. `401` if the master key is incorrect. * Response: An array of `DeviceRegistration` elements encoded in JSON. `401` if the master key is incorrect.
*/ */
case listUnapprovedDevices = "check" case listUnapprovedDevices = "check"