add update task function

parent e694ce3f
......@@ -20,6 +20,9 @@ module.exports = function (Task) {
removeTaskById : function (taskId) {
return dbUtils.dbRemoveItem(Task, {_id: taskId});
},
updateTask : function(taskId, name, task, comment) {
return dbUtils.dbFindOneAndUpdate(Task, {_id: taskId}, {name: name, task: task, comment: comment});
},
updateTaskMeta : function (taskId, meta) {
return dbUtils.dbFindOneAndUpdate(Task, {_id: taskId}, {meta : meta});
}
......
{
"name": "mirera-db",
"version": "1.3.0",
"version": "1.4.0",
"description": "DB utils for mirera program testing server",
"main": "index.js",
"scripts": {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment