backend/helpers/SessionManager.js
/**
     * Generates a new token for a user that is logged in
     * returns null if the user id is not from a logged user.
     *
     * @param userId
     * @returns { string , null}
     */
Generates a new token for a user that is logged in
returns null if the user id is not from a logged user.

@param userId
@returns { string , null}
Generates a new token for a user that is logged in returns null if the user id is not from a logged user . @param userId @returns { string null }
generateTokenForUser(userId) {
        let userSession = this.sessions[userId];
        if (userSession) {
            userSession.token = this.generateToken(userId);
            return userSession.token;
        } else {
            return null;
        }
    }
generateTokenForUser ( userId ) { let userSession = this . sessions [ userId ] ; if ( userSession ) { userSession . token = this . generateToken ( userId ) ; return userSession . token ; } else { return null ; } }
Generates a new token for a user that is logged in
 returns null if the user id is not from a logged user.
Generates a new token for a user that is logged in returns null if the user id is not from a logged user .