diff --git a/frontend/src/app/app.module.ts b/frontend/src/app/app.module.ts
index 7570926..e51dd75 100644
--- a/frontend/src/app/app.module.ts
+++ b/frontend/src/app/app.module.ts
@@ -1,6 +1,6 @@
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
-import {OAuthModule, OAuthStorage} from 'angular-oauth2-oidc';
+import { OAuthModule, OAuthStorage } from 'angular-oauth2-oidc';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { HomeComponent } from './home/home.component';
@@ -19,13 +19,13 @@ import { LegalComponent } from './legal/legal.component';
import { ManualComponent } from './manual/manual.component';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { HistoryComponent } from './history/history.component';
-import {Ng2SearchPipeModule} from "ng2-search-filter";
import { environment } from './../environments/environment';
-import {HttpClient, HttpClientModule} from '@angular/common/http';
-import {TranslateModule, TranslateLoader} from '@ngx-translate/core';
-import {TranslateHttpLoader} from '@ngx-translate/http-loader';
+import { HttpClient, HttpClientModule } from '@angular/common/http';
+import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
+import { TranslateHttpLoader } from '@ngx-translate/http-loader';
+import { Ng2SearchPipeModule } from 'ng2-search-filter';
-export function storageFactory() : OAuthStorage {
+export function storageFactory(): OAuthStorage {
return localStorage;
}
diff --git a/frontend/src/app/common/services/user.service.ts b/frontend/src/app/common/services/user.service.ts
index cadcf46..8e5a1ec 100644
--- a/frontend/src/app/common/services/user.service.ts
+++ b/frontend/src/app/common/services/user.service.ts
@@ -6,8 +6,7 @@ import {authCodeFlowConfig} from '../../sso.config';
import {merge, Observable} from 'rxjs';
import {fromPromise} from 'rxjs/internal-compatibility';
import {HttpClient} from '@angular/common/http';
-import {CookieService} from "ngx-cookie-service";
-import {ActivatedRoute, Router} from '@angular/router';
+
@Injectable({
providedIn: 'root'
})
@@ -80,14 +79,14 @@ export class UserService {
this.user.sn = user.sn;
this.user.name = user.given_name;
this.user.admin = false;
- this.oauthService.loadUserProfile().then(r => {
- if (r.attributes['memberOf']) {
+ this.oauthService.loadUserProfile().then((r: any) => { // Specify the type of 'r' as 'any'
+ if (r.attributes && r.attributes['memberOf']) { // Check if 'attributes' property exists
if (r.attributes['memberOf'].indexOf(this.authService.adminDn) > -1) {
this.user.admin = true;
}
}
this.check_freezeState();
- if(r.attributes['signedhosting'] === "false")
+ if(r.attributes && r.attributes['signedhosting'] === "false") // Check if 'attributes' property exists
this.user.chartevalidated = false;
else
this.user.chartevalidated = true;
diff --git a/frontend/src/app/dns/dns.component.ts b/frontend/src/app/dns/dns.component.ts
index 5cdb405..2a6928a 100644
--- a/frontend/src/app/dns/dns.component.ts
+++ b/frontend/src/app/dns/dns.component.ts
@@ -176,7 +176,7 @@ export class DnsComponent implements OnInit, OnDestroy {
if(this.user.chartevalidated || this.user.admin) {
this.http.delete(this.authService.SERVER_URL + '/dns/' + id, {observe: 'response'})
.subscribe(
- rep => {
+ () => {
window.location.reload();
},
error => {
diff --git a/frontend/src/app/footer/footer.component.ts b/frontend/src/app/footer/footer.component.ts
index 7272855..a395586 100644
--- a/frontend/src/app/footer/footer.component.ts
+++ b/frontend/src/app/footer/footer.component.ts
@@ -1,13 +1,12 @@
-import { Component, OnInit } from '@angular/core';
-import {TranslateService} from "@ngx-translate/core";
+import { Component} from '@angular/core';
import {CookieService} from "ngx-cookie-service";
-
@Component({
selector: 'app-footer',
templateUrl: './footer.component.html',
styleUrls: ['./footer.component.css']
})
+
export class FooterComponent {
date: Date = new Date();
diff --git a/frontend/src/app/history/history.component.ts b/frontend/src/app/history/history.component.ts
index dd8f8ae..c311003 100644
--- a/frontend/src/app/history/history.component.ts
+++ b/frontend/src/app/history/history.component.ts
@@ -16,7 +16,7 @@ import {CookieService} from "ngx-cookie-service";
styleUrls: ['./history.component.css']
})
export class HistoryComponent implements OnInit {
- history: any;
+ history: unknown;
page = 1;
errorcode = 201;
pageSize = 200;
diff --git a/frontend/src/app/home/home.component.html b/frontend/src/app/home/home.component.html
index 000bee8..f6e7318 100644
--- a/frontend/src/app/home/home.component.html
+++ b/frontend/src/app/home/home.component.html
@@ -277,7 +277,7 @@