diff --git a/src/api/notification/services/notification.ts b/src/api/notification/services/notification.ts index 803750c..765090b 100644 --- a/src/api/notification/services/notification.ts +++ b/src/api/notification/services/notification.ts @@ -20,9 +20,14 @@ export default factories.createCoreService(MODULE_ID, ({ strapi }) => { }, populate: { notification_template: { - fields: ['id', 'title', 'description', 'url', 'push', 'thumbnail'] + fields: ['id', 'title', 'description', 'url', 'push'], + populate: { + thumbnail: { + fields: ['url'] + } + } } - }, + } } ) @@ -32,7 +37,8 @@ export default factories.createCoreService(MODULE_ID, ({ strapi }) => { title: notification.notification_template.title, description: templateNotification(notification.notification_template.description, notification.data), url: notification.notification_template.url, - thumbnail: notification.notification_template.thumbnail + createdAt: notification.createdAt, + thumbnail: notification.notification_template.thumbnail.url })) }, } diff --git a/src/extensions/documentation/documentation/1.0.0/full_documentation.json b/src/extensions/documentation/documentation/1.0.0/full_documentation.json index 94bc87d..f5f46ed 100644 --- a/src/extensions/documentation/documentation/1.0.0/full_documentation.json +++ b/src/extensions/documentation/documentation/1.0.0/full_documentation.json @@ -14,7 +14,7 @@ "name": "Apache 2.0", "url": "https://www.apache.org/licenses/LICENSE-2.0.html" }, - "x-generation-date": "2024-05-08T11:32:34.749Z" + "x-generation-date": "2024-05-08T12:17:32.662Z" }, "x-strapi-config": { "path": "/documentation",