mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Merge pull request #1736 from omnivore-app/fix/use-ilike-in-recent-email-query
Use ilike for recent email query
This commit is contained in:
commit
4b8e0a69d5
1 changed files with 2 additions and 1 deletions
|
|
@ -15,6 +15,7 @@ import { NewsletterEmail } from '../../entity/newsletter_email'
|
|||
import { generateUniqueUrl, parseEmailAddress } from '../../utils/parser'
|
||||
import { sendEmail } from '../../utils/sendEmail'
|
||||
import { env } from '../../env'
|
||||
import { ILike } from 'typeorm'
|
||||
|
||||
export const recentEmailsResolver = authorized<
|
||||
RecentEmailsSuccess,
|
||||
|
|
@ -84,7 +85,7 @@ export const markEmailAsItemResolver = authorized<
|
|||
|
||||
const newsletterEmail = await getRepository(NewsletterEmail).findOne({
|
||||
where: {
|
||||
address: recentEmail.to,
|
||||
address: ILike(recentEmail.to),
|
||||
user: { id: claims.uid },
|
||||
},
|
||||
relations: ['user'],
|
||||
|
|
|
|||
Loading…
Reference in a new issue