File tree Expand file tree Collapse file tree 5 files changed +3
-118
lines changed Expand file tree Collapse file tree 5 files changed +3
-118
lines changed Original file line number Diff line number Diff line change @@ -36,8 +36,6 @@ export {
36
36
populateTestimonySubmissionNotificationEvents ,
37
37
cleanupNotifications ,
38
38
deliverNotifications ,
39
- httpsDeliverNotifications ,
40
- httpsCleanupNotifications ,
41
39
updateUserNotificationFrequency
42
40
} from "./notifications"
43
41
Original file line number Diff line number Diff line change @@ -67,22 +67,3 @@ const runCleanupNotifications = async () => {
67
67
export const cleanupNotifications = functions . pubsub
68
68
. schedule ( "every 24 hours" )
69
69
. onRun ( runCleanupNotifications )
70
-
71
- export const httpsCleanupNotifications = functions . https . onRequest (
72
- async ( request , response ) => {
73
- try {
74
- console . log ( "httpsCleanupNotifications triggered" )
75
- await runCleanupNotifications ( )
76
- console . log ( "DEBUG: cleanupNotifications completed" )
77
-
78
- response
79
- . status ( 200 )
80
- . send (
81
- "Successfully cleaned up old notifications, topic events, and email documents"
82
- )
83
- } catch ( error ) {
84
- console . error ( "Error in httpsCleanupNotifications:" , error )
85
- response . status ( 500 ) . send ( "Internal server error" )
86
- }
87
- }
88
- )
Original file line number Diff line number Diff line change @@ -233,26 +233,11 @@ const renderToHtmlString = (digestData: NotificationEmailDigest) => {
233
233
"utf8"
234
234
)
235
235
const compiledTemplate = handlebars . compile ( templateSource )
236
- return compiledTemplate ( { digestData } )
236
+ return compiledTemplate ( digestData )
237
237
}
238
238
239
239
// Firebase Functions
240
240
export const deliverNotifications = functions . pubsub
241
241
. schedule ( "47 9 1 * 2" ) // 9:47 AM on the first day of the month and on Tuesdays
242
242
. timeZone ( "America/New_York" )
243
243
. onRun ( deliverEmailNotifications )
244
-
245
- export const httpsDeliverNotifications = functions . https . onRequest (
246
- async ( request , response ) => {
247
- try {
248
- await deliverEmailNotifications ( )
249
-
250
- console . log ( "DEBUG: deliverNotifications completed" )
251
-
252
- response . status ( 200 ) . send ( "Successfully delivered notifications" )
253
- } catch ( error ) {
254
- console . error ( "Error in deliverNotifications:" , error )
255
- response . status ( 500 ) . send ( "Internal server error" )
256
- }
257
- }
258
- )
Original file line number Diff line number Diff line change 2
2
import { publishNotifications } from "./publishNotifications"
3
3
import { populateBillHistoryNotificationEvents } from "./populateBillHistoryNotificationEvents"
4
4
import { populateTestimonySubmissionNotificationEvents } from "./populateTestimonySubmissionNotificationEvents"
5
- import {
6
- cleanupNotifications ,
7
- httpsCleanupNotifications
8
- } from "./cleanupNotifications"
9
- import {
10
- deliverNotifications ,
11
- httpsDeliverNotifications
12
- } from "./deliverNotifications"
5
+ import { cleanupNotifications } from "./cleanupNotifications"
6
+ import { deliverNotifications } from "./deliverNotifications"
13
7
import { updateUserNotificationFrequency } from "./updateUserNotificationFrequency"
14
8
15
9
// Export the functions
@@ -19,7 +13,5 @@ export {
19
13
populateTestimonySubmissionNotificationEvents ,
20
14
cleanupNotifications ,
21
15
deliverNotifications ,
22
- httpsDeliverNotifications ,
23
- httpsCleanupNotifications ,
24
16
updateUserNotificationFrequency
25
17
}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments