diff --git a/frontend/src/app/component/einstellungen/editieren/editieren.component.ts b/frontend/src/app/component/einstellungen/editieren/editieren.component.ts index c9ae507..9487623 100644 --- a/frontend/src/app/component/einstellungen/editieren/editieren.component.ts +++ b/frontend/src/app/component/einstellungen/editieren/editieren.component.ts @@ -53,7 +53,7 @@ export class EditierenComponent implements OnInit { } public loadFeed(id) { - this.http.get('http://' + environment.location + ':' + environment.port + '/feeds/' + id + '/').subscribe( + this.http.get('http://' + environment.location + ':' + environment.port_be + '/feeds/' + id + '/').subscribe( (data: any) => { this.url = data.url; this.active = data.active; @@ -86,7 +86,7 @@ export class EditierenComponent implements OnInit { form.append('icon', feedData.icon._files['0']); } if (this.id == null) { - this.http.post('http://' + environment.location + ':' + environment.port + '/feeds/', form).subscribe( + this.http.post('http://' + environment.location + ':' + environment.port_be + '/feeds/', form).subscribe( () => { this._snackbar.open('Feed erfolgreich gespeichert!', 'Schließen', {duration: 3000}); }, @@ -97,7 +97,7 @@ export class EditierenComponent implements OnInit { } ); } else { - this.http.put('http://' + environment.location + ':' + environment.port + '/feeds/' + this.id + '/', form).subscribe( + this.http.put('http://' + environment.location + ':' + environment.port_be + '/feeds/' + this.id + '/', form).subscribe( () => { this._snackbar.open('Feed erfolgreich gespeichert!', 'Schließen', {duration: 3000}); }, diff --git a/frontend/src/app/component/einstellungen/einstellungen.component.ts b/frontend/src/app/component/einstellungen/einstellungen.component.ts index cb6243f..a2b770c 100644 --- a/frontend/src/app/component/einstellungen/einstellungen.component.ts +++ b/frontend/src/app/component/einstellungen/einstellungen.component.ts @@ -35,7 +35,7 @@ export class EinstellungenComponent implements OnInit { } deleteFeed(id: number) { - this.http.delete('http://' + environment.location + ':' + environment.port + '/feeds/' + id + '/').subscribe( + this.http.delete('http://' + environment.location + ':' + environment.port_be + '/feeds/' + id + '/').subscribe( () => { this._snackbar.open('Feed erfolgreich gelöscht!', 'Schließen', {duration: 3000}); this.feeds = this.feeds.filter(feed => feed.id !== id); diff --git a/frontend/src/app/component/login/login.component.ts b/frontend/src/app/component/login/login.component.ts index 9cf2633..7053691 100644 --- a/frontend/src/app/component/login/login.component.ts +++ b/frontend/src/app/component/login/login.component.ts @@ -62,7 +62,7 @@ export class LoginComponent implements OnInit { 'client_id=waecm' + '&response_type=id_token' + '&prompt=consent' + - '&redirect_uri=http://' + environment.location + ':' + environment.port + + '&redirect_uri=http://' + environment.location + ':' + environment.port_fe + '&scope=openid%20profile' + '&nonce=' + nonce; window.location.replace(url); diff --git a/frontend/src/app/component/tweets/tweets.component.ts b/frontend/src/app/component/tweets/tweets.component.ts index d7e9870..c661000 100644 --- a/frontend/src/app/component/tweets/tweets.component.ts +++ b/frontend/src/app/component/tweets/tweets.component.ts @@ -53,7 +53,7 @@ export class TweetsComponent implements OnInit { console.log(this.tweets); this.http.get( - 'http://' + environment.location + ':' + environment.port + '/getMoreTweets/' + this.tweets[this.tweets.length - 1].tweet_id + '/' + 'http://' + environment.location + ':' + environment.port_be + '/getMoreTweets/' + this.tweets[this.tweets.length - 1].tweet_id + '/' ).subscribe(data => { console.log(data); @@ -78,7 +78,7 @@ export class TweetsComponent implements OnInit { fillTweets() { - this.http.get('http://' + environment.location + ':' + environment.port + '/getSixTweets/').subscribe(data => { + this.http.get('http://' + environment.location + ':' + environment.port_be + '/getSixTweets/').subscribe(data => { console.log(data); for (const tweet of data) { const position = tweet.text.search(': http'); diff --git a/frontend/src/app/services/feed.service.ts b/frontend/src/app/services/feed.service.ts index c15a198..eecf874 100644 --- a/frontend/src/app/services/feed.service.ts +++ b/frontend/src/app/services/feed.service.ts @@ -9,7 +9,7 @@ import {environment} from '../../environments/environment'; providedIn: 'root' }) export class FeedService { - private url = 'http://' + environment.location + ':' + environment.port + '/feeds/'; + private url = 'http://' + environment.location + ':' + environment.port_be + '/feeds/'; constructor(private http: HttpClient) {} diff --git a/frontend/src/app/services/rest.service.ts b/frontend/src/app/services/rest.service.ts index 191381d..40a4662 100644 --- a/frontend/src/app/services/rest.service.ts +++ b/frontend/src/app/services/rest.service.ts @@ -6,7 +6,7 @@ import {Observable} from 'rxjs'; @Injectable() export class RestService { - private currentLocation = 'http://' + environment.location + ':' + environment.port + '/'; + private currentLocation = 'http://' + environment.location + ':' + environment.port_be + '/'; constructor( private logger: NGXLogger, diff --git a/frontend/src/app/services/twitter.service.ts b/frontend/src/app/services/twitter.service.ts index 9413c12..b32f4f4 100644 --- a/frontend/src/app/services/twitter.service.ts +++ b/frontend/src/app/services/twitter.service.ts @@ -3,11 +3,11 @@ import {Injectable} from '@angular/core'; import {NGXLogger} from 'ngx-logger'; import {environment} from '../../environments/environment'; import {Observable} from 'rxjs'; -import {Tweet} from "../interfaces/interface"; +import {Tweet} from '../interfaces/interface'; @Injectable() export class TwitterService { - private currentLocation = 'http://' + environment.location + ':' + environment.port + '/'; + private currentLocation = 'http://' + environment.location + ':' + environment.port_be + '/'; constructor( private logger: NGXLogger, diff --git a/frontend/src/environments/environment.ts b/frontend/src/environments/environment.ts index d27dc37..774f2dc 100644 --- a/frontend/src/environments/environment.ts +++ b/frontend/src/environments/environment.ts @@ -5,7 +5,8 @@ export const environment = { openid_endpoint: 'https://waecm-sso.inso.tuwien.ac.at/auth/realms/waecm/protocol/openid-connect', production: true, location: window.location.hostname, - port: 8000, + port_be: 8000, + port_fe: 4200, log_level: NgxLoggerLevel.WARN, };