function logoutUser() {
  request
  .get('/v1/logout/')
  .end((error /* , res*/) => {
    if (!error) {
      window.location.href = '/login';
    }
  });
}
/**
 * Send request to logout user and redirect to login page
 */
Send request to logout user and redirect to login page
Send request to logout user and redirect to login page
function logoutUser() {
  request
  .get('/v1/logout/')
  .end((error ) => {
    if (!error) {
      window.location.href = '/login';
    }
  });
}
function logoutUser ( ) { request . get ( '/v1/logout/' ) . end ( ( error ) => { if ( ! error ) { window . location . href = '/login' ; } } ) ; }
Send request to logout user and redirect to login page
Send request to logout user and redirect to login page
/* , res*/