Commit 1bb8aa73 authored by Rosanny Sihombing's avatar Rosanny Sihombing
Browse files

handle error result

parent 86701a67
......@@ -153,9 +153,10 @@ var methods = {
},
addProjectOverview: function(data, callback) {
dbconn.project.query('INSERT INTO project_overview SET ?', data, function (err, results, fields){
if (err) throw err;
//console.log(results.insertId)
callback(results.insertId, err);
if (err) {
console.error(err);
}
callback(results, err);
})
}
};
......
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