misc old changes
This commit is contained in:
@@ -40,8 +40,8 @@ exports.findByName = function(fieldName, days, cb) {
|
||||
|
||||
exports.insert = function(device_id, field_name, value, cb){
|
||||
var params = [device_id, field_name,value];
|
||||
let sql = `INSERT INTO devicemessages(device_id,field_name,field_value,timestamp)
|
||||
VALUES (?,?,?,NOW());`;
|
||||
let sql = `INSERT INTO devicemessages(device_id,field_name,field_value,timestamp,createdAt,updatedAt )
|
||||
VALUES (?,?,?,NOW(),NOW(),NOW());`;
|
||||
pool.getConnection(function(err, con) {
|
||||
if (err) throw err; // not connected!
|
||||
con.query(sql,params,(err, r) => {
|
||||
|
||||
Reference in New Issue
Block a user