fix postgres nedbtodb

Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
si458 2024-03-31 13:52:16 +01:00
parent 95bbd7157f
commit 7b67b992e2
1 changed files with 1 additions and 0 deletions

1
db.js
View File

@ -2028,6 +2028,7 @@ module.exports.CreateDB = function (parent, func) {
obj.StoreEvent = function (event, func) {
obj.dbCounters.eventsSet++;
sqlDbQuery('INSERT INTO events VALUES (DEFAULT, $1, $2, $3, $4, $5, $6) RETURNING id', [event.time, ((typeof event.domain == 'string') ? event.domain : null), event.action, event.nodeid ? event.nodeid : null, event.userid ? event.userid : null, event], function (err, docs) {
if(func){ func(); }
if (docs.id) {
for (var i in event.ids) {
if (event.ids[i] != '*') {