Fix loading local time line (#34)
This commit is contained in:
parent
7f5330f284
commit
79febd92e7
|
@ -8,6 +8,15 @@ public struct Application: Codable, Identifiable {
|
|||
public let website: URL?
|
||||
}
|
||||
|
||||
extension Application {
|
||||
public init(from decoder: Decoder) throws {
|
||||
let values = try decoder.container(keyedBy: CodingKeys.self)
|
||||
|
||||
name = try values.decodeIfPresent(String.self, forKey: .name) ?? ""
|
||||
website = try? values.decodeIfPresent(URL.self, forKey: .website)
|
||||
}
|
||||
}
|
||||
|
||||
public enum Visibility: String, Codable, CaseIterable {
|
||||
case pub = "public"
|
||||
case unlisted
|
||||
|
|
Loading…
Reference in New Issue