diff --git a/Emitron/Emitron/Networking/Adapters/EntityAdapters/ContentAdapter.swift b/Emitron/Emitron/Networking/Adapters/EntityAdapters/ContentAdapter.swift index 52859410..5c8c8040 100644 --- a/Emitron/Emitron/Networking/Adapters/EntityAdapters/ContentAdapter.swift +++ b/Emitron/Emitron/Networking/Adapters/EntityAdapters/ContentAdapter.swift @@ -30,12 +30,14 @@ import struct Foundation.URL struct ContentAdapter: EntityAdapter { - static func process(resource: JSONAPIResource, relationships: [EntityRelationship] = []) throws -> Content? { + static func process(resource: JSONAPIResource, relationships: [EntityRelationship] = []) throws -> Content { guard resource.entityType == .content else { throw EntityAdapterError.invalidResourceTypeForAdapter } guard let contentTypeString = resource.attributes["content_type"] as? String, let contentType = ContentType(string: contentTypeString) - else { return nil } + else { + throw EntityAdapterError.invalidOrMissingAttributes + } guard let uri = resource.attributes["uri"] as? String, let name = resource.attributes["name"] as? String, diff --git a/README.md b/README.md index 8c8b8488..ee3c5ebe 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ There is more info about contributing in [CONTRIBUTING.md](CONTRIBUTING.md). ## Development -__emitron__ runs on iOS 13.3 and greater. It uses SwiftUI and Combine extensively; and since these two technologies were very new at the time of creation, there are plenty of places in the code that could benefit from some refactoring. +__emitron__ runs on iOS 16.0 and greater. It uses SwiftUI and Combine extensively; and since these two technologies were very new at the time of creation, there are plenty of places in the code that could benefit from some refactoring. Currently, only people that hold an active kodeco.com subscription may use emitron. Non-subscribers will be shown a "no access" page on login. Subscribers have access to streaming videos, and a subset of subscribers (ones with a "Professional" subscription) is allowed to download videos for offline playback.