better user equality check
This commit is contained in:
parent
065ca90550
commit
832957171c
1 changed files with 3 additions and 2 deletions
|
|
@ -250,10 +250,11 @@ const getUser = () => {
|
||||||
* Returns a promise containing the public key of the newly created user.
|
* Returns a promise containing the public key of the newly created user.
|
||||||
* @param {string} alias
|
* @param {string} alias
|
||||||
* @param {string} pass
|
* @param {string} pass
|
||||||
* @param {UserGUNNode=} _user
|
* @param {UserGUNNode=} __user
|
||||||
* @returns {Promise<string>}
|
* @returns {Promise<string>}
|
||||||
*/
|
*/
|
||||||
const authenticate = async (alias, pass, _user = user) => {
|
const authenticate = async (alias, pass, __user) => {
|
||||||
|
const _user = __user || user
|
||||||
const isFreshGun = _user !== user
|
const isFreshGun = _user !== user
|
||||||
if (isFreshGun) {
|
if (isFreshGun) {
|
||||||
const ack = await new Promise(res => {
|
const ack = await new Promise(res => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue