Skip to content

Commit

Permalink
fix: search notifications for account with any case (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
shoom3301 authored Jun 19, 2024
1 parent 27f82ca commit dff026d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/api/notification/services/notification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,17 @@ export default factories.createCoreService(MODULE_ID, ({ strapi }) => {
},
async getNotificationList(account: string) {
const push = false
const templateFilter = notificationsTemplateFilter(push)
const notifications = await strapi.entityService.findMany(
MODULE_ID,
{
start: 0,
limit: 50,
filters: {
account,
notification_template: notificationsTemplateFilter(push)
$or: [
{ account, notification_template: templateFilter },
{ account: account.toLowerCase(), notification_template: templateFilter },
]
},
populate: NOTIFICATIONS_POPULATE
}
Expand Down

0 comments on commit dff026d

Please sign in to comment.