tsviewer-frontend/src/services/ApiService.ts

11 lines
382 B
TypeScript

const API_URL = 'https://ts.cliffbreak.de/v1/';
export default class ApiService {
public static async fetchAllChannels() {
const channelRes = await fetch(API_URL + 'channels');
const clientRes = await fetch(API_URL + 'clients');
const channelJson = await channelRes.json();
const clientJson = await clientRes.json();
return { channelJson, clientJson };
}
}