timy-messenger/firebase/functions/channel-remove.js
Franz Heinfling 64d39ac266 Initial commit.
Co-authored-by: Miguel Beltran <m@beltran.work>
2019-10-01 17:26:36 +02:00

12 lines
417 B
JavaScript

const functions = require('firebase-functions');
const { deleteCalendarEntry } = require('./calendar-update');
const deleteChannel = functions
.region('europe-west1')
.firestore
.document('/groups/{groupId}/channels/{channelId}')
.onDelete(async (snap, context) => {
return await deleteCalendarEntry(context.params.groupId, context.params.channelId);
});
module.exports = deleteChannel;