add http interceptor

This commit is contained in:
Peter Maquiran
2023-07-11 17:54:08 +01:00
parent 12178d6c3a
commit 9b690c3848
7 changed files with 118 additions and 38 deletions
+6 -14
View File
@@ -10,6 +10,7 @@ import { ThemeService } from 'src/app/services/theme.service';
import { environment } from 'src/environments/environment';
import { Storage } from '@ionic/storage';
import { ChatController } from './controller/chat';
import { LoggingInterceptorService } from 'src/app/services/logging-interceptor.service'
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
parse: {
@@ -38,35 +39,26 @@ export class AppComponent {
private statusBar: StatusBar,
public ThemeService: ThemeService,
private storage: Storage,
private ChatSystemService: ChatSystemService
private ChatSystemService: ChatSystemService,
private LoggingInterceptorService: LoggingInterceptorService
) {
this.initializeApp();
this.storage.set('version', environment.version).then(() => {})
ChatController.ChatSystemService = this.ChatSystemService
}
initializeApp() {
this.platform.ready().then(() => {
this.statusBar.styleDefault();
/* this.splashScreen.hide(); */
if (this.platform.is("tablet")) {
window.screen.orientation.unlock();
} else if( this.platform.is("mobile")) {
window.screen.orientation.lock('portrait');
}
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
} else {
try {
// this.sqliteservice.databaseConn();
} catch (error) {
}
}
});
}
}