This commit is contained in:
Manuel Hude
2021-05-04 20:22:23 +02:00
8 changed files with 13 additions and 12 deletions
@@ -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});
},
@@ -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);
@@ -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);
@@ -53,7 +53,7 @@ export class TweetsComponent implements OnInit {
console.log(this.tweets);
this.http.get<Tweet[]>(
'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<Tweet[]>('http://' + environment.location + ':' + environment.port + '/getSixTweets/').subscribe(data => {
this.http.get<Tweet[]>('http://' + environment.location + ':' + environment.port_be + '/getSixTweets/').subscribe(data => {
console.log(data);
for (const tweet of data) {
const position = tweet.text.search(': http');
+1 -1
View File
@@ -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) {}
+1 -1
View File
@@ -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,
+2 -2
View File
@@ -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,