Add missing 'const'

This commit is contained in:
lideming 2020-12-03 00:37:16 +08:00
parent 5ad948b124
commit e0e84deb92
3 changed files with 7 additions and 7 deletions

View File

@ -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();

View File

@ -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);

View File

@ -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 {