using api_url constant in fetch
This commit is contained in:
parent
b8d10d914f
commit
52278a54e1
1 changed files with 1 additions and 1 deletions
|
@ -2,7 +2,7 @@ const API_URL = 'http://haveachin.de:1888/v1/channels';
|
|||
|
||||
export default class ChannelService {
|
||||
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();
|
||||
return json;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue