Configure proxy for API requests and remove hardcoded apiUrl from environment files.
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
import {Component, EventEmitter, Input, OnChanges, OnInit, Output} from '@angular/core';
|
||||
import {BASE_PATH, HistoryService, PunishmentHistory} from '@api';
|
||||
import {HistoryService, PunishmentHistory} from '@api';
|
||||
import {catchError, map, Observable, shareReplay} from 'rxjs';
|
||||
import { NgOptimizedImage } from '@angular/common';
|
||||
import {NgOptimizedImage} from '@angular/common';
|
||||
import {CookieService} from 'ngx-cookie-service';
|
||||
import {RemoveTrailingPeriodPipe} from '@pipes/RemoveTrailingPeriodPipe';
|
||||
import {HttpErrorResponse} from '@angular/common/http';
|
||||
import {environment} from '@environment';
|
||||
import {HistoryFormatService} from '../history-format.service';
|
||||
import {SearchParams} from '../search-terms';
|
||||
import {Router} from '@angular/router';
|
||||
@@ -15,12 +14,11 @@ import {Router} from '@angular/router';
|
||||
imports: [
|
||||
NgOptimizedImage,
|
||||
RemoveTrailingPeriodPipe
|
||||
],
|
||||
],
|
||||
templateUrl: './history.component.html',
|
||||
styleUrl: './history.component.scss',
|
||||
providers: [
|
||||
CookieService,
|
||||
{provide: BASE_PATH, useValue: environment.apiUrl}
|
||||
],
|
||||
})
|
||||
export class HistoryComponent implements OnInit, OnChanges {
|
||||
|
||||
Reference in New Issue
Block a user