Fix other than markdown editorial workflow entries on dashboard.

When entries were loaded for the editorial workflow dashboard, they were
all assumed to be FrontMatter/MarkDown files. This PR allows them to be
any supported format.
This commit is contained in:
Caleb
2017-11-09 13:14:45 -07:00
committed by Shawn Erquhart
parent 4d33d67798
commit 37a36ffed4
4 changed files with 13 additions and 17 deletions

View File

@ -164,8 +164,8 @@ class Backend {
};
}
unpublishedEntries(page, perPage) {
return this.implementation.unpublishedEntries(page, perPage)
unpublishedEntries(collections) {
return this.implementation.unpublishedEntries()
.then(loadedEntries => loadedEntries.filter(entry => entry !== null))
.then(entries => (
entries.map((loadedEntry) => {
@ -184,7 +184,10 @@ class Backend {
))
.then(entries => ({
pagination: 0,
entries: entries.map(this.entryWithFormat("editorialWorkflow")),
entries: entries.map(entry => {
const collection = collections.get(entry.collection);
return this.entryWithFormat(collection)(entry);
}),
}));
}