Commit db2e4b0c authored by Duvara Nishaharan's avatar Duvara Nishaharan
Browse files

endret adressen

parent a8ac9b77
......@@ -2,7 +2,7 @@ import axios, {AxiosResponse} from 'axios';
import { Country } from '../interfaces/Country';
function getData(query: string): Promise<Country[]> {
return axios.get('http://it2810-28.idi.ntnu.no:8081/graphql?query='+query)
return axios.get('http://it2810-28.idi.ntnu.no:3001/graphql?query='+query)
.then((response: AxiosResponse) => {
if(response.data.data.country === null ){
return []
......@@ -14,7 +14,7 @@ export function getAllData(filter: string=""): Promise<Country[]> {
return getData('{country'+filter+'{name, native, continent, capital, currency, languages}}');
}
function numberOfResults(query: string): Promise<number> {
return axios.get('http://it2810-28.idi.ntnu.no:8081/graphql?query='+query)
return axios.get('http://it2810-28.idi.ntnu.no:3001/graphql?query='+query)
.then((response: AxiosResponse) => {
if(response.data.data.TotalCountires === null ){
return 0
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment