@rmdes/indiekit-endpoint-blogroll 1.0.8 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/controllers/blogs.js +8 -1
- package/package.json +1 -1
package/lib/controllers/blogs.js
CHANGED
|
@@ -157,7 +157,14 @@ async function edit(request, response) {
|
|
|
157
157
|
return response.status(404).render("404");
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
-
const
|
|
160
|
+
const rawItems = await getItemsForBlog(application, blog._id, 10);
|
|
161
|
+
const items = rawItems.map((item) => ({
|
|
162
|
+
...item,
|
|
163
|
+
published:
|
|
164
|
+
item.published instanceof Date
|
|
165
|
+
? item.published.toISOString()
|
|
166
|
+
: item.published,
|
|
167
|
+
}));
|
|
161
168
|
|
|
162
169
|
response.render("blogroll-blog-edit", {
|
|
163
170
|
title: request.__("blogroll.blogs.edit"),
|