diff --git a/src/domain/fixture/api/adapter/bingoal.ts b/src/domain/fixture/api/adapter/bingoal.ts index 7a7b01e..fe94f72 100644 --- a/src/domain/fixture/api/adapter/bingoal.ts +++ b/src/domain/fixture/api/adapter/bingoal.ts @@ -1,13 +1,13 @@ import makeRequest from '../../../../services/request'; import { GetFixtures, GetFixture } from '../indexBackend'; -export const getFixturesFromBingoal: GetFixtures = async () => +export const getFixtures: GetFixtures = async () => makeRequest({ method: 'get', url: `${window.location.origin}/api/fixtures`, }); -export const getFixtureFromBingoal: GetFixture = async (id: string) => +export const getFixture: GetFixture = async (id: string) => makeRequest({ method: 'get', url: `${window.location.origin}/api/fixtures/${id}`, diff --git a/src/domain/fixture/api/indexFrontend.ts b/src/domain/fixture/api/indexFrontend.ts index 92ba150..6f8784e 100644 --- a/src/domain/fixture/api/indexFrontend.ts +++ b/src/domain/fixture/api/indexFrontend.ts @@ -1,12 +1,9 @@ -import FixturePreview from '../data/FixturePreview'; -import Fixture from '../data/Fixture'; +import { GetFixture, GetFixtures } from './indexBackend'; import { - getFixturesFromBingoal, - getFixtureFromBingoal, + getFixtures as getFixturesFromBingoal, + getFixture as getFixtureFromBingoal, } from './adapter/bingoal'; -export type GetFixtures = () => Promise; export const getFixtures: GetFixtures = getFixturesFromBingoal; -export type GetFixture = (id: string) => Promise; export const getFixture: GetFixture = getFixtureFromBingoal;