File tree Expand file tree Collapse file tree 4 files changed +2
-23
lines changed Expand file tree Collapse file tree 4 files changed +2
-23
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,6 @@ export {
36
36
populateTestimonySubmissionNotificationEvents ,
37
37
cleanupNotifications ,
38
38
deliverNotifications ,
39
- httpsDeliverNotifications ,
40
39
httpsCleanupNotifications ,
41
40
updateUserNotificationFrequency
42
41
} from "./notifications"
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 @@ -6,10 +6,7 @@ import {
6
6
cleanupNotifications ,
7
7
httpsCleanupNotifications
8
8
} from "./cleanupNotifications"
9
- import {
10
- deliverNotifications ,
11
- httpsDeliverNotifications
12
- } from "./deliverNotifications"
9
+ import { deliverNotifications } from "./deliverNotifications"
13
10
import { updateUserNotificationFrequency } from "./updateUserNotificationFrequency"
14
11
15
12
// Export the functions
@@ -19,7 +16,6 @@ export {
19
16
populateTestimonySubmissionNotificationEvents ,
20
17
cleanupNotifications ,
21
18
deliverNotifications ,
22
- httpsDeliverNotifications ,
23
19
httpsCleanupNotifications ,
24
20
updateUserNotificationFrequency
25
21
}
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ const db = admin.firestore()
12
12
const notificationFunctions : {
13
13
[ K in FunctionName ] ?: K
14
14
} = {
15
- httpsDeliverNotifications : "httpsDeliverNotifications" ,
16
15
httpsCleanupNotifications : "httpsCleanupNotifications"
17
16
}
18
17
You can’t perform that action at this time.
0 commit comments