mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
do not throw error if failed to find tokens
This commit is contained in:
parent
bd237d06fa
commit
c346ba8703
1 changed files with 3 additions and 1 deletions
|
|
@ -5,6 +5,7 @@ import { StatusType, User } from '../entity/user'
|
|||
import { authTrx, getRepository, queryBuilderToRawSql } from '../repository'
|
||||
import { userRepository } from '../repository/user'
|
||||
import { SetClaimsRole } from '../utils/dictionary'
|
||||
import { logger } from '../utils/logger'
|
||||
import {
|
||||
PushNotificationType,
|
||||
sendMulticastPushNotifications,
|
||||
|
|
@ -135,7 +136,8 @@ export const sendPushNotifications = async (
|
|||
) => {
|
||||
const tokens = await findDeviceTokensByUserId(userId)
|
||||
if (tokens.length === 0) {
|
||||
throw new Error('No device tokens found')
|
||||
logger.info(`No device tokens found for user ${userId}`)
|
||||
return
|
||||
}
|
||||
|
||||
const message = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue