Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
export const webhookTrello = functions.region(REGION).https.onRequest( async(req, res) => {
const action = req.body.action
if(action && action.display.translationKey !== 'unknown') {
const data = {
action: action,
changeTime: Date.now() + 25200000,
}
const board = action.data.board
board.changeTime = Date.now() + 25200000
await firestore.collection('board').doc(action.data.board.id).set(board)
await firestore.collection('change').doc(action.id).set(data)
}
res.status(200).send("OK")
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment