UNPKG

@wmfs/tymly-cardscript-plugin

Version:

Plugin which handles interactions to do with Cardscript

16 lines (12 loc) 372 B
'use strict' class RemoveTodoEntries { init (resourceConfig, env) { this.todos = env.bootedServices.storage.models.tymly_todos } run (event, context) { this.todos.destroyById(event.todoId) .then(context.sendTaskSuccess()) .catch(err => context.sendTaskFailure({ error: 'removeTodoFail', cause: err })) } } module.exports = RemoveTodoEntries