Skip to content

Commit

Permalink
fix: add more fields to notification model (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
shoom3301 authored May 8, 2024
1 parent 5e86d0f commit 8c74a9c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions src/api/notification/services/notification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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']
}
}
}
},
}
}
)

Expand All @@ -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
}))
},
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 8c74a9c

Please sign in to comment.