diff --git a/src/app/pages/pages-routing.module.ts b/src/app/pages/pages-routing.module.ts index 16d0ee33..37f00417 100644 --- a/src/app/pages/pages-routing.module.ts +++ b/src/app/pages/pages-routing.module.ts @@ -4,7 +4,6 @@ import {NgModule} from '@angular/core'; import {PagesComponent} from './pages.component'; import {NotFoundComponent} from './miscellaneous/not-found/not-found.component'; import {PromotionComponent} from './promotion/promotion.component'; -import {ServerExamplesComponent} from './sample/server-examples.component'; const routes: Routes = [{ path: '', diff --git a/src/app/pages/promotion/promotion.component.ts b/src/app/pages/promotion/promotion.component.ts index 68e55d19..3443d3e3 100644 --- a/src/app/pages/promotion/promotion.component.ts +++ b/src/app/pages/promotion/promotion.component.ts @@ -54,7 +54,6 @@ export class PromotionComponent implements OnInit { ngOnInit(): void { this.service.getPromotion().subscribe((result) => { this.source = Object.assign([], result); - console.log(this.source); }); } diff --git a/src/app/pages/promotion/promotion.service.ts b/src/app/pages/promotion/promotion.service.ts index 73bada67..3518a8c3 100644 --- a/src/app/pages/promotion/promotion.service.ts +++ b/src/app/pages/promotion/promotion.service.ts @@ -6,7 +6,7 @@ import {HttpErrorResponse, HttpHeaders} from '@angular/common/http'; import { PromotionList } from '../../@core/data/promotion'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class PromotionService { constructor(private http: HttpClient) { @@ -14,12 +14,6 @@ export class PromotionService { getPromotion(): Observable { const url = 'http://localhost:8011/api/promotions/all'; - const headers = new HttpHeaders({ - 'Content-Type': 'application/json', - 'X-Requested-Url': url, - 'X-Requested-Method': 'GET', - }); - const options = {headers: headers}; return this.http.get(url).pipe( map(this.extractData), catchError(this.handleError),