22 lines
503 B
Swift
22 lines
503 B
Swift
|
|
struct NotificationRequest {
|
|
|
|
let accessToken: String
|
|
|
|
/// The notificiations in the available languages
|
|
let notifications: [String : WebNotification]
|
|
|
|
init(accessToken: String, notifications: [String : WebNotification]) {
|
|
self.accessToken = accessToken
|
|
self.notifications = notifications
|
|
}
|
|
|
|
func notification(for language: String) -> WebNotification? {
|
|
notifications[language] ?? notifications["en"]
|
|
}
|
|
}
|
|
|
|
extension NotificationRequest: Codable {
|
|
|
|
}
|