migrate firewall configuration into database

the ports.json is for the moment server specific
This commit is contained in:
Girish Ramakrishnan
2021-05-04 15:21:38 -07:00
parent d8e464d9c7
commit 7de454911e
8 changed files with 79 additions and 13 deletions
+3 -2
View File
@@ -11,7 +11,7 @@ exports = module.exports = {
_clear: clear
};
var assert = require('assert'),
const assert = require('assert'),
BoxError = require('./boxerror.js'),
database = require('./database.js');
@@ -30,8 +30,9 @@ function get(key, callback) {
});
}
// won't get the blobs
function getAll(callback) {
database.query(`SELECT ${SETTINGS_FIELDS} FROM settings ORDER BY name`, function (error, results) {
database.query(`SELECT ${SETTINGS_FIELDS} FROM settings WHERE value IS NOT NULL ORDER BY name`, function (error, results) {
if (error) return callback(new BoxError(BoxError.DATABASE_ERROR, error));
callback(null, results);