diff --git a/.github/workflows/deploy-firebase.yaml b/.github/workflows/deploy-firebase.yaml index 97a6c11c..8c59ed42 100644 --- a/.github/workflows/deploy-firebase.yaml +++ b/.github/workflows/deploy-firebase.yaml @@ -1,6 +1,5 @@ name: Deploy on: - workflow_dispatch: push: branches: - master diff --git a/firebase/functions/src/index.ts b/firebase/functions/src/index.ts index 039bc123..1e307cd9 100644 --- a/firebase/functions/src/index.ts +++ b/firebase/functions/src/index.ts @@ -3,6 +3,7 @@ import * as admin from 'firebase-admin'; import { REGION_EUROPE_WEST_1 } from './config'; +import { handleAskForMoreHelp as handleAskForMoreHelpFunction } from './domain/handleAskForMoreHelp'; import { onAskForHelpCreate } from './domain/onAskForHelpCreate'; import { onDeletedCreate } from './domain/onDeletedCreate'; import { onUserDelete } from './domain/onUserDelete'; @@ -13,7 +14,6 @@ import { onSubscribeToBeNotifiedCreate } from './domain/onSubscribeToBeNotifiedC import { searchAndSendNotificationEmails } from './domain/searchAndSendNotificationEmails'; import { updateGeoDB } from './domain/geoData'; import { onContentUpdate } from './domain/onContentUpdate'; -import { sendNotificationsForHotlineRequests } from './domain/sendNotificationsForHotlineRequests'; import { sendEmails } from './domain/sendEmails'; import { onSlackInteraction } from './utilities/slack'; @@ -34,13 +34,6 @@ export const sendNotificationEmails = functions .timeZone('Europe/Berlin') .onRun(searchAndSendNotificationEmails); -export const sendSlackNotificationsForHotlineRequests = functions - .region(REGION_EUROPE_WEST_1) - .pubsub - .schedule('00 9-22/6 * * *') // Every day at 9:00, 15:00 & 21:00. https://crontab.guru/#0_9-22/6_*_*_* - .timeZone('Europe/Berlin') - .onRun(sendNotificationsForHotlineRequests); - export const askForHelpCreate = functions .region(REGION_EUROPE_WEST_1) .firestore @@ -77,6 +70,11 @@ export const offerHelpCreate = functions .document(`/${CollectionName.AskForHelp}/{requestId}/offer-help/{offerId}`) .onCreate(onOfferHelpCreate); +export const handleAskForMoreHelp = functions + .region(REGION_EUROPE_WEST_1) + .https + .onCall(handleAskForMoreHelpFunction); + export const deleteUserData = functions .region(REGION_EUROPE_WEST_1) .auth