dist/lib/api.js
function logout() {
    if (exports.currentLogin === null) {
        log_1.logger.debug(`[API] Already logged out`);
        return Promise.resolve();
    }
    log_1.logger.info(`[API] Logging out ${exports.currentLogin.username}`);
    return get('logout', null, true).then(() => {
        clearHeaders();
        exports.currentLogin = null;
    });
}
function logout() {
    if (exports.currentLogin === null) {
        log_1.logger.debug(`[API] Already logged out`);
        return Promise.resolve();
    }
    log_1.logger.info(`[API] Logging out ${exports.currentLogin.username}`);
    return get('logout', null, true).then(() => {
        clearHeaders();
        exports.currentLogin = null;
    });
}
function logout ( ) { if ( exports . currentLogin === null ) { log_1 . logger . debug ( ` ` ) ; return Promise . resolve ( ) ; } log_1 . logger . info ( ` ${ exports . currentLogin . username } ` ) ; return get ( 'logout' , null , true ) . then ( ( ) => { clearHeaders ( ) ; exports . currentLogin = null ; } ) ; }
Logout a user at end of API calls
Logout a user at end of API calls