logout through interceptor
This commit is contained in:
commit
fa10c43236
|
@ -29,6 +29,8 @@ import { DatasetsModule } from './datasets/dataset.module';
|
||||||
import { DmpModule } from './dmps/dmp.module';
|
import { DmpModule } from './dmps/dmp.module';
|
||||||
import { TabModule } from './tabs/tab.module';
|
import { TabModule } from './tabs/tab.module';
|
||||||
|
|
||||||
|
import { HTTP_INTERCEPTORS } from '@angular/common/http';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
AppComponent,
|
AppComponent,
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { Router, ActivatedRoute } from '@angular/router';
|
||||||
import { ServerService } from '../../app/services/server.service';
|
import { ServerService } from '../../app/services/server.service';
|
||||||
import { Project } from '../entities/model/project';
|
import { Project } from '../entities/model/project';
|
||||||
import { Dataset } from '../entities/model/dataset';
|
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';
|
import { DataTable, DataTableTranslations, DataTableResource } from 'angular-4-data-table-bootstrap-4';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { Component, OnInit, Input, Output, EventEmitter, ViewChild } from '@ang
|
||||||
import {GoogleSignInSuccess} from 'angular-google-signin';
|
import {GoogleSignInSuccess} from 'angular-google-signin';
|
||||||
import { Router, ActivatedRoute } from '@angular/router';
|
import { Router, ActivatedRoute } from '@angular/router';
|
||||||
import { ServerService } from '../../app/services/server.service';
|
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 { Dataset } from '../entities/model/dataset';
|
||||||
import { Project } from '../entities/model/project';
|
import { Project } from '../entities/model/project';
|
||||||
import { DataTable, DataTableTranslations, DataTableResource } from 'angular-4-data-table-bootstrap-4';
|
import { DataTable, DataTableTranslations, DataTableResource } from 'angular-4-data-table-bootstrap-4';
|
||||||
|
|
|
@ -3,7 +3,7 @@ import {GoogleSignInSuccess} from 'angular-google-signin';
|
||||||
import { Router, ActivatedRoute } from '@angular/router';
|
import { Router, ActivatedRoute } from '@angular/router';
|
||||||
import { ServerService } from '../../app/services/server.service';
|
import { ServerService } from '../../app/services/server.service';
|
||||||
import { Project } from '../entities/model/project';
|
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 { Dataset } from '../entities/model/dataset';
|
||||||
import { DataTable, DataTableTranslations, DataTableResource } from 'angular-4-data-table-bootstrap-4';
|
import { DataTable, DataTableTranslations, DataTableResource } from 'angular-4-data-table-bootstrap-4';
|
||||||
import { DropdownField } from '../../app/form/fields/dropdown/field-dropdown';
|
import { DropdownField } from '../../app/form/fields/dropdown/field-dropdown';
|
||||||
|
|
|
@ -28,6 +28,7 @@ export class GlobalInterceptor implements HttpInterceptor {
|
||||||
localStorage.removeItem('currentUser');
|
localStorage.removeItem('currentUser');
|
||||||
});
|
});
|
||||||
this.tokenService.setToken(null);
|
this.tokenService.setToken(null);
|
||||||
|
//EDW VALE TO KWDIKA GIA TO LOGOUT KAI SXOLIASE TON OPOU ALLOU TON EXEIS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue