mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 16:00:32 +00:00
use seconds threshold provided in argument inputs
This commit is contained in:
@@ -25,7 +25,9 @@ export const MutationResolvers: Resolvers<ServerContext> = {
|
|||||||
|
|
||||||
const notificationData: NotificationSchedulingArguments = {
|
const notificationData: NotificationSchedulingArguments = {
|
||||||
...args.input,
|
...args.input,
|
||||||
secondsThreshold: ETANotificationScheduler.defaultSecondsThresholdForNotificationToFire,
|
secondsThreshold: typeof args.input.secondsThreshold === 'number'
|
||||||
|
? args.input.secondsThreshold
|
||||||
|
: ETANotificationScheduler.defaultSecondsThresholdForNotificationToFire,
|
||||||
}
|
}
|
||||||
|
|
||||||
await context.notificationService.scheduleNotification(notificationData);
|
await context.notificationService.scheduleNotification(notificationData);
|
||||||
|
|||||||
Reference in New Issue
Block a user