diff options
Diffstat (limited to 'bots/todo-js')
| -rw-r--r-- | bots/todo-js/tools.js | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/bots/todo-js/tools.js b/bots/todo-js/tools.js index ed3ed39..0c9db49 100644 --- a/bots/todo-js/tools.js +++ b/bots/todo-js/tools.js @@ -34,7 +34,7 @@ exports.del_todo = function delTodo(args) { fs.writeFileSync(todosFile, JSON.stringify(newData)); console.log(`Successfully deleted todo id=${args.id}`); } else { - _die('Empty todo list'); + console.log('Empty todo list'); } } @@ -46,7 +46,7 @@ exports.list_todos = function listTodos() { if (fs.existsSync(todosFile)) { console.log(fs.readFileSync(todosFile, "utf8")); } else { - _die('Empty todo list'); + console.log("[]"); } } @@ -66,8 +66,3 @@ function _getTodosFile() { } return path.join(cacheDir, 'todos.json'); } - -function _die(message) { - console.error(message); - process.exit(1); -}
\ No newline at end of file |
