using api_url constant in fetch

This commit is contained in:
Niel 2019-02-14 11:08:50 +01:00
parent b8d10d914f
commit 52278a54e1

View file

@ -2,7 +2,7 @@ const API_URL = 'http://haveachin.de:1888/v1/channels';
export default class ChannelService { export default class ChannelService {
public static async fetchAllChannels() { public static async fetchAllChannels() {
const response = await fetch('http://haveachin.de:1888/v1/channels'); const response = await fetch(API_URL);
const json = await response.json(); const json = await response.json();
return json; return json;
} }