Browse Source

Server: Bugfix: wasn't able to delete regexp-checks via PUT endpoint

Christian Kahlau 3 years ago
parent
commit
788c84699f
1 changed files with 2 additions and 2 deletions
  1. 2 2
      server/src/ctrl/database.class.ts

+ 2 - 2
server/src/ctrl/database.class.ts

@@ -345,8 +345,8 @@ export class Database extends SQLiteController {
         });
 
         if (delIDs.length) {
-          const delSql = 'DELETE FROM HealthCheckParams WHERE ID IN (?);';
-          await this.run(delSql, [delIDs]);
+          const delSql = `DELETE FROM HealthCheckParams WHERE ID IN (${delIDs.map(() => '?').join(',')});`;
+          await this.run(delSql, delIDs);
         }
 
         if (updValues.length) {