Closed rhaetscher closed 1 year ago
@Multi538 du kannst das hier auch schon machen, indem du Platzhalter-URLS etc. nutzt und in der "SteamRepositoryAxios" class die Mockliste zurückgibst.
// in App.vue z.B.
const axios = new AxiosInstance()
const repo = new SteamRepositoryAxios(axios)
loadGames() {
repo.loadGames()
}
// in SteamRepositoryAxios
import { MockGames }from "src/mockdata.ts"
....
loadGames() {
return Promise.resolve(MockGames )
}
... and extract the GET logic into its own files:
SteamRepository.ts // -> describes WHAT functions exist ( getGames(): Array )
SteamRepositoryAxios.ts // -> is a class that implements SteamRepository that uses axios
If you are unsure how it is done, look it up in our RA-MICRO Web Repo