Skip to content

Commit

Permalink
changes on storage when inserting new text data on commands and trigg…
Browse files Browse the repository at this point in the history
…ers - this time is okay
  • Loading branch information
SoraKenji committed Apr 6, 2022
1 parent 56972c2 commit f6c3da1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/agent/utils/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var types = {
keys: ['id', 'command', 'target', 'options', 'started_resp', 'started', 'stopped_resp', 'stopped'],
values: (data) => {
return `'${data.id}', '${data.command}', '${data.target}', '${JSON.stringify(
data.options).replaceAll("'","")}' , 0, 'NULL', 0, 'NULL'`;
data.options).replace(/'/g, "")}' , 0, 'NULL', 0, 'NULL'`;
}
},
geofences: {
Expand All @@ -45,7 +45,7 @@ var types = {
values: (data) => {
return `'${data.id}', '${data.name}', '${data.persist}', '${data.synced_at}', '${
data.last_exec
}', '${JSON.stringify(data.automation_events).replaceAll("'","")}', '${JSON.stringify(data.automation_actions).replaceAll("'","")}'`;
}', '${JSON.stringify(data.automation_events).replace(/'/g, "")}', '${JSON.stringify(data.automation_actions).replace(/'/g, "")}'`;
}
},
keys: {
Expand Down

0 comments on commit f6c3da1

Please sign in to comment.