updated url

master
Max 5 years ago
parent afe9b773a5
commit a530fe2e5f

@ -6,6 +6,7 @@ import { Levellist } from 'src/app/models/levellist';
import { Http } from '@angular/http';
import { Router } from '@angular/router';
import { User } from 'src/app/models/user';
import { environment } from 'src/environments/environment';
@Component({
selector: 'app-scaffold',
@ -49,7 +50,7 @@ export class AppScaffoldComponent implements OnInit {
}
logout() {
let url = 'https://greenvironment.net/graphql'
let url = environment.graphQLUrl
let headers = new Headers()
headers.set('Content-Type', 'application/json')

@ -4,6 +4,7 @@ import {Http, URLSearchParams, Headers} from '@angular/http';
import { User } from 'src/app/models/user';
import { Actionlist } from 'src/app/models/actionlist';
import { Levellist } from 'src/app/models/levellist';
import { environment } from 'src/environments/environment';
@Component({
selector: 'app-profile',
@ -23,7 +24,7 @@ export class ProfileComponent implements OnInit {
ngOnInit() {
this.id = this.router.url.substr(this.router.url.lastIndexOf("/") + 1);
//let url = './graphql'
let url = 'https://greenvironment.net/graphql'
let url = environment.graphQLUrl
let headers = new Headers();
headers.set('Content-Type', 'application/json');

@ -3,6 +3,7 @@ import { DatasharingService } from 'src/app/services/datasharing.service';
import { Http } from '@angular/http';
import { FriendInfo } from 'src/app/models/friendinfo';
import { Router } from '@angular/router';
import { environment } from 'src/environments/environment';
@Component({
selector: 'social-friends',
@ -24,7 +25,7 @@ export class FriendsComponent implements OnInit {
getFriendsNames() {
for(let id of this.friendIDs) {
let url = 'https://greenvironment.net/graphql'
let url = environment.graphQLUrl
let headers = new Headers();
headers.set('Content-Type', 'application/json');

@ -40,7 +40,7 @@ export class ChatService {
console.log("Getting chats by ID..")
for(let chatId of pChatIDs) {
let url = 'https://greenvironment.net/graphql'
let url = environment.graphQLUrl
let headers = new Headers()
headers.set('Content-Type', 'application/json')
@ -54,7 +54,7 @@ export class ChatService {
}
public createNewChat(pUserID: number) {
let url = 'https://greenvironment.net/graphql'
let url = environment.graphQLUrl
let headers = new Headers()
headers.set('Content-Type', 'application/json')
@ -63,7 +63,7 @@ export class ChatService {
}
public requestAllChatPartners(): Array<FriendInfo> {
let url = 'https://greenvironment.net/graphql'
let url = environment.graphQLUrl
let chatPartners: Array<FriendInfo>
let temp
@ -91,7 +91,7 @@ export class ChatService {
}
public sendMessage(pChatID: number, pContent: string) {
let url = 'https://greenvironment.net/graphql'
let url = environment.graphQLUrl
let headers = new Headers()
headers.set('Content-Type', 'application/json')
@ -101,7 +101,7 @@ export class ChatService {
public getMessages(pChatID): Array<Chatmessage> {
let messages: Array<Chatmessage>
let url = 'https://greenvironment.net/graphql'
let url = environment.graphQLUrl
let headers = new Headers()
headers.set('Content-Type', 'application/json')

@ -29,7 +29,7 @@ export class FeedService {
}
public createPost2(pContent: String){
let url = 'https://greenvironment.net/graphql'
let url = environment.graphQLUrl
let headers = new Headers()
headers.set('Content-Type', 'application/json')
@ -43,7 +43,7 @@ export class FeedService {
}
public upvote(pPostID: number): void {
let url = 'https://greenvironment.net/graphql'
let url = environment.graphQLUrl
let headers = new Headers()
headers.set('Content-Type', 'application/json')
@ -59,7 +59,7 @@ export class FeedService {
}
public downvote(pPostID: number): void {
let url = 'https://greenvironment.net/graphql'
let url = environment.graphQLUrl
let headers = new Headers()
headers.set('Content-Type', 'application/json')
@ -75,7 +75,7 @@ export class FeedService {
}
public getAllPosts(): Array<Post> {
let url = 'https://greenvironment.net/graphql'
let url = environment.graphQLUrl
let headers = new Headers()
headers.set('Content-Type', 'application/json')
@ -89,7 +89,7 @@ export class FeedService {
}
public getAllPostsRaw(): any {
let url = 'https://greenvironment.net/graphql'
let url = environment.graphQLUrl
let headers = new Headers()
headers.set('Content-Type', 'application/json')

Loading…
Cancel
Save