Merge pull request #6 from rock-n-code/bugfix/api-service-parameters

Bugfix: Added missing public initialisers for the Credentials and File parameters in the API service.
This commit is contained in:
Javier Cicchelli 2022-12-05 23:40:25 +01:00 committed by GitHub
commit aac89d9e49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,11 +20,33 @@ public protocol Service {
// MARK: - Structs
public struct Credentials {
// MARK: Properties
let username: String
let password: String
// MARK: Initialisers
public init(username: String, password: String) {
self.username = username
self.password = password
}
}
public struct File {
// MARK: Properties
let name: String
let data: Data
// MARK: Initialisers
public init(name: String, data: Data) {
self.name = name
self.data = data
}
}