| | |
| | | import {onMounted, reactive, ref} from "vue" |
| | | import {useRoute} from "vue-router" |
| | | import Pagination from "../components/Pagination.vue" |
| | | import {routerBase} from "@/lib/api" |
| | | import {getKurse, routerBase} from "@/lib/api" |
| | | |
| | | const route = useRoute() |
| | | const kurse = ref([]) |
| | |
| | | ///////////////////////////////////////////////////////////////////////// |
| | | |
| | | async function init (offset = 0) { |
| | | const res = await fetch(`/api/kurs?token=jiuGfr432898D90290kjfsldkfn3hh8F`) |
| | | const data = await res.json() |
| | | const data = await getKurse() |
| | | console.log(data) |
| | | if (res.status === 200) { |
| | | kurse.value = data |
| | | } |
| | | else { |
| | | error.value = `ERROR: ${res.status}` |
| | | } |
| | | } |
| | | |
| | | function go (offset) { |