From 89bf2afd388d318610d9946317ffd2212f39dab8 Mon Sep 17 00:00:00 2001 From: Leo Dion Date: Mon, 17 Aug 2020 14:34:41 -0400 Subject: [PATCH] quick hotfix for youtube videos --- .../Controllers/Routing/HTMLController.swift | 12 ++++++------ orchardnest.sql | 0 2 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 orchardnest.sql diff --git a/Sources/OrchardNestServer/Controllers/Routing/HTMLController.swift b/Sources/OrchardNestServer/Controllers/Routing/HTMLController.swift index 86a555b..f9ff2c1 100644 --- a/Sources/OrchardNestServer/Controllers/Routing/HTMLController.swift +++ b/Sources/OrchardNestServer/Controllers/Routing/HTMLController.swift @@ -45,8 +45,8 @@ struct HTMLController { } return entries } - .flatMapEachThrowing { - try EntryItem(entry: $0) + .mapEachCompact { + try? EntryItem(entry: $0) } .map { (items) -> HTML in HTML( @@ -108,8 +108,8 @@ struct HTMLController { .filter(Channel.self, \Channel.$id == channel) .limit(32) .all() - .flatMapEachThrowing { - try EntryItem(entry: $0) + .mapEachCompact { + try? EntryItem(entry: $0) } .map { (items) -> HTML in HTML( @@ -141,8 +141,8 @@ struct HTMLController { .filter(Channel.self, \Channel.$language.$id == "en") .limit(32) .all() - .flatMapEachThrowing { - try EntryItem(entry: $0) + .mapEachCompact { + try? EntryItem(entry: $0) } .map { (items) -> HTML in HTML( diff --git a/orchardnest.sql b/orchardnest.sql new file mode 100644 index 0000000..e69de29