34 lines
1.2 KiB
TypeScript
34 lines
1.2 KiB
TypeScript
import * as functions from 'firebase-functions'
|
|
import * as admin from 'firebase-admin'
|
|
|
|
// Initialize the Admin SDK once for every function in this codebase.
|
|
// Handlers call admin.firestore()/messaging() lazily at invocation time, so a
|
|
// single idempotent init here is sufficient and avoids "already exists" errors.
|
|
if (admin.apps.length === 0) {
|
|
admin.initializeApp()
|
|
}
|
|
|
|
export { revenueCatWebhook } from './billing/revenueCatWebhook'
|
|
export { syncEntitlement } from './billing/syncEntitlement'
|
|
export {
|
|
sendDailyQuestionReminder,
|
|
sendPartnerAnsweredNotification,
|
|
} from './notifications/reminders'
|
|
export { checkDeviceIntegrity } from './security/checkDeviceIntegrity'
|
|
export { createDateMatchOnMutualLove } from './dates/createDateMatch'
|
|
export {
|
|
assignDailyQuestion,
|
|
assignDailyQuestionCallable,
|
|
} from './questions/assignDailyQuestion'
|
|
export { onAnswerWritten } from './questions/onAnswerWritten'
|
|
export { onCoupleLeave } from './couples/onCoupleLeave'
|
|
export { onGameSessionUpdate } from './games/onGameSessionUpdate'
|
|
|
|
/**
|
|
* Basic health check callable.
|
|
* Useful for verifying function deployment and firebase-tools wiring.
|
|
*/
|
|
export const health = functions.https.onRequest((req, res) => {
|
|
res.status(200).json({ status: 'ok' })
|
|
})
|