diff --git a/src/controllers/auth.js b/src/controllers/auth.js index a5099c2..8772f65 100644 --- a/src/controllers/auth.js +++ b/src/controllers/auth.js @@ -7,7 +7,7 @@ const argon2 = require('argon2'); const usersController = require('../controllers/usersController'); -hash_check = async function(user, password) { +const hash_check = async function(user, password) { let verified = false; try { var users = await usersController.get_users(); diff --git a/src/controllers/usersController.js b/src/controllers/usersController.js index 780dc48..59161b1 100644 --- a/src/controllers/usersController.js +++ b/src/controllers/usersController.js @@ -17,7 +17,7 @@ const chmod = util.promisify(fs.chmod); let _users = null; -get_users = async function() { +const get_users = async function() { if (_users) { return _users; } else { @@ -31,7 +31,7 @@ get_users = async function() { } exports.get_users = get_users; -update_users = async function(users) { +const update_users = async function(users) { try { await writeFile(passwd_file, JSON.stringify(users), 'utf8'); await chmod(passwd_file, 0600); diff --git a/src/controllers/zt.js b/src/controllers/zt.js index cf770ff..c2faad9 100644 --- a/src/controllers/zt.js +++ b/src/controllers/zt.js @@ -10,7 +10,7 @@ const token = require('./token'); ZT_ADDR = process.env.ZT_ADDR || 'localhost:9993'; -init_options = async function() { +const init_options = async function() { let tok = null; try { @@ -29,7 +29,7 @@ init_options = async function() { return options; } -get_zt_address = async function() { +const get_zt_address = async function() { const options = await init_options(); try { @@ -68,7 +68,7 @@ exports.network_list = async function() { return networks; } -network_detail = async function(nwid) { +const network_detail = async function(nwid) { const options = await init_options(); try { @@ -241,7 +241,7 @@ exports.members = async function(nwid) { } } -member_detail = async function(nwid, id) { +const member_detail = async function(nwid, id) { const options = await init_options(); try {