INNER CODE UNIT · JavaScript

handlePaused

adeekshith/watomatic · functions/index.js:1343

async function handlePaused(userId, subscription) {
    logger.info('Subscription paused', { userId });

    await admin.firestore().collection('users').doc(userId).set({
        subscription: {
            isActive: false,
            paused: true,
            pausedAt: admin.firestore.FieldValue.serverTimestamp(),
        }
    }, { merge: true });
}

/**
 * Handle revoked subscription
 */
async function handleRevoked(userId, subscription) {
    logger.info('Subscription revoked', { userId });

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…