From 4091f6c8f5895da9c3a349a966c30483670cc2b0 Mon Sep 17 00:00:00 2001 From: j-weissen Date: Tue, 18 Oct 2022 08:12:31 +0200 Subject: [PATCH] lastViewed bugfix findOne --- backend/strapi/src/api/note/controllers/note.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/strapi/src/api/note/controllers/note.js b/backend/strapi/src/api/note/controllers/note.js index 4f3cd54..84e7a8d 100644 --- a/backend/strapi/src/api/note/controllers/note.js +++ b/backend/strapi/src/api/note/controllers/note.js @@ -50,6 +50,9 @@ module.exports = createCoreController(noteUid, ({strapi}) => ({ lastViewed: Date.now() } }) + entry = await strapi.entityService.findOne(noteUid, noteId, { + populate: ['owners'], + }); return JSON.stringify(entry); } else { ctx.response.status = 403;