mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 13:28:11 +00:00
Zmiana adresu API Stacjownika
This commit is contained in:
@@ -27,6 +27,7 @@ import { defineComponent } from 'vue';
|
||||
|
||||
import styleMixin from '@/mixins/styleMixin';
|
||||
import Station from '@/scripts/interfaces/Station';
|
||||
import axios from 'axios';
|
||||
|
||||
export default defineComponent({
|
||||
mixins: [styleMixin],
|
||||
@@ -37,6 +38,10 @@ export default defineComponent({
|
||||
},
|
||||
},
|
||||
|
||||
async mounted() {
|
||||
// const dispatcherInfo = await axios.get()
|
||||
},
|
||||
|
||||
data: () => ({
|
||||
icons: {
|
||||
spawn: require('@/assets/icon-spawn.svg'),
|
||||
|
||||
@@ -4,5 +4,6 @@ export const URLs = {
|
||||
stations: "https://api.td2.info.pl:9640/?method=getStationsOnline",
|
||||
trains: "https://api.td2.info.pl:9640/?method=getTrainsOnline",
|
||||
dispatchers: "https://api.td2.info.pl:9640/?method=readFromSWDR&value=getDispatcherStatusList%3B1",
|
||||
stacjownikAPI: "https://stacjownik.herokuapp.com",
|
||||
getTimetableURL: (trainNo: string | number, region = "eu") => `https://api.td2.info.pl:9640/?method=readFromSWDR&value=getTimetable%3B${trainNo}%3B${region}`
|
||||
};
|
||||
@@ -126,11 +126,12 @@ import ActionButton from '@/components/Global/ActionButton.vue';
|
||||
import JournalOptions from '@/components/JournalView/JournalOptions.vue';
|
||||
|
||||
import FilterOption from '@/scripts/interfaces/FilterOption';
|
||||
import { URLs } from '@/scripts/utils/apiURLs';
|
||||
|
||||
const PROD_MODE = true;
|
||||
|
||||
const API_URL = PROD_MODE
|
||||
? 'https://stacjownik-api-di22o.ondigitalocean.app/api/getTimetables'
|
||||
? `${URLs.stacjownikAPI}/api/getTimetables`
|
||||
: 'http://localhost:3001/api/getTimetables';
|
||||
|
||||
interface APIResponse {
|
||||
|
||||
Reference in New Issue
Block a user