mirror of
https://github.com/key-networks/ztncui.git
synced 2025-06-07 18:53:45 +02:00
Add missing 'const'
This commit is contained in:
parent
5ad948b124
commit
e0e84deb92
3 changed files with 7 additions and 7 deletions
|
@ -7,7 +7,7 @@
|
||||||
const argon2 = require('argon2');
|
const argon2 = require('argon2');
|
||||||
const usersController = require('../controllers/usersController');
|
const usersController = require('../controllers/usersController');
|
||||||
|
|
||||||
hash_check = async function(user, password) {
|
const hash_check = async function(user, password) {
|
||||||
let verified = false;
|
let verified = false;
|
||||||
try {
|
try {
|
||||||
var users = await usersController.get_users();
|
var users = await usersController.get_users();
|
||||||
|
|
|
@ -17,7 +17,7 @@ const chmod = util.promisify(fs.chmod);
|
||||||
|
|
||||||
let _users = null;
|
let _users = null;
|
||||||
|
|
||||||
get_users = async function() {
|
const get_users = async function() {
|
||||||
if (_users) {
|
if (_users) {
|
||||||
return _users;
|
return _users;
|
||||||
} else {
|
} else {
|
||||||
|
@ -31,7 +31,7 @@ get_users = async function() {
|
||||||
}
|
}
|
||||||
exports.get_users = get_users;
|
exports.get_users = get_users;
|
||||||
|
|
||||||
update_users = async function(users) {
|
const update_users = async function(users) {
|
||||||
try {
|
try {
|
||||||
await writeFile(passwd_file, JSON.stringify(users), 'utf8');
|
await writeFile(passwd_file, JSON.stringify(users), 'utf8');
|
||||||
await chmod(passwd_file, 0600);
|
await chmod(passwd_file, 0600);
|
||||||
|
|
|
@ -10,7 +10,7 @@ const token = require('./token');
|
||||||
|
|
||||||
ZT_ADDR = process.env.ZT_ADDR || 'localhost:9993';
|
ZT_ADDR = process.env.ZT_ADDR || 'localhost:9993';
|
||||||
|
|
||||||
init_options = async function() {
|
const init_options = async function() {
|
||||||
let tok = null;
|
let tok = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -29,7 +29,7 @@ init_options = async function() {
|
||||||
return options;
|
return options;
|
||||||
}
|
}
|
||||||
|
|
||||||
get_zt_address = async function() {
|
const get_zt_address = async function() {
|
||||||
const options = await init_options();
|
const options = await init_options();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -68,7 +68,7 @@ exports.network_list = async function() {
|
||||||
return networks;
|
return networks;
|
||||||
}
|
}
|
||||||
|
|
||||||
network_detail = async function(nwid) {
|
const network_detail = async function(nwid) {
|
||||||
const options = await init_options();
|
const options = await init_options();
|
||||||
|
|
||||||
try {
|
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();
|
const options = await init_options();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Add table
Reference in a new issue