logout through interceptor

This commit is contained in:
annampak 2017-10-27 11:49:34 +03:00
commit fa10c43236
5 changed files with 6 additions and 3 deletions

View File

@ -29,6 +29,8 @@ import { DatasetsModule } from './datasets/dataset.module';
import { DmpModule } from './dmps/dmp.module';
import { TabModule } from './tabs/tab.module';
import { HTTP_INTERCEPTORS } from '@angular/common/http';
@NgModule({
declarations: [
AppComponent,

View File

@ -4,7 +4,7 @@ import { Router, ActivatedRoute } from '@angular/router';
import { ServerService } from '../../app/services/server.service';
import { Project } from '../entities/model/project';
import { Dataset } from '../entities/model/dataset';
import { Dmp } from '../entities/model/Dmp';
import { Dmp } from '../entities/model/dmp';
import { DataTable, DataTableTranslations, DataTableResource } from 'angular-4-data-table-bootstrap-4';
@Component({

View File

@ -2,7 +2,7 @@ import { Component, OnInit, Input, Output, EventEmitter, ViewChild } from '@ang
import {GoogleSignInSuccess} from 'angular-google-signin';
import { Router, ActivatedRoute } from '@angular/router';
import { ServerService } from '../../app/services/server.service';
import { Dmp } from '../entities/model/Dmp';
import { Dmp } from '../entities/model/dmp';
import { Dataset } from '../entities/model/dataset';
import { Project } from '../entities/model/project';
import { DataTable, DataTableTranslations, DataTableResource } from 'angular-4-data-table-bootstrap-4';

View File

@ -3,7 +3,7 @@ import {GoogleSignInSuccess} from 'angular-google-signin';
import { Router, ActivatedRoute } from '@angular/router';
import { ServerService } from '../../app/services/server.service';
import { Project } from '../entities/model/project';
import { Dmp } from '../entities/model/Dmp';
import { Dmp } from '../entities/model/dmp';
import { Dataset } from '../entities/model/dataset';
import { DataTable, DataTableTranslations, DataTableResource } from 'angular-4-data-table-bootstrap-4';
import { DropdownField } from '../../app/form/fields/dropdown/field-dropdown';

View File

@ -28,6 +28,7 @@ export class GlobalInterceptor implements HttpInterceptor {
localStorage.removeItem('currentUser');
    });
this.tokenService.setToken(null);
//EDW VALE TO KWDIKA GIA TO LOGOUT KAI SXOLIASE TON OPOU ALLOU TON EXEIS
}
}
});