@wmfs/tymly-cardscript-plugin
Version:
Plugin which handles interactions to do with Cardscript
16 lines (12 loc) • 402 B
JavaScript
class UnwatchBoard {
init (resourceConfig, env) {
this.watchedBoards = env.bootedServices.storage.models.tymly_watchedBoards
}
run (event, context) {
this.watchedBoards.destroyById(event.subscriptionId)
.then(() => context.sendTaskSuccess())
.catch(err => context.sendTaskFailure({ error: 'unwatchBoardFail', cause: err }))
}
}
module.exports = UnwatchBoard