@@ -213,7 +213,6 @@ import Settings from '@/components/Settings.vue'
213213import Pagination from ' @/components/Pagination.vue'
214214import Loading from ' @/components/Loading.vue'
215215import ResponseTimeChart from ' @/components/ResponseTimeChart.vue'
216- import { SERVER_URL } from ' @/main.js'
217216import { generatePrettyTimeAgo , generatePrettyTimeDifference } from ' @/utils/time'
218217
219218const router = useRouter ()
@@ -228,7 +227,6 @@ const resultPageSize = 50
228227const showResponseTimeChartAndBadges = ref (false )
229228const showAverageResponseTime = ref (false )
230229const selectedChartDuration = ref (' 24h' )
231- const serverUrl = SERVER_URL === ' .' ? ' ..' : SERVER_URL
232230const isRefreshing = ref (false )
233231
234232const latestResult = computed (() => {
@@ -305,7 +303,7 @@ const lastCheckTime = computed(() => {
305303const fetchData = async () => {
306304 isRefreshing .value = true
307305 try {
308- const response = await fetch (` ${ serverUrl } /api/v1/endpoints/${ route .params .key } /statuses?page=${ currentPage .value } &pageSize=${ resultPageSize} ` , {
306+ const response = await fetch (` /api/v1/endpoints/${ route .params .key } /statuses?page=${ currentPage .value } &pageSize=${ resultPageSize} ` , {
309307 credentials: ' include'
310308 })
311309
@@ -386,15 +384,15 @@ const prettifyTimestamp = (timestamp) => {
386384}
387385
388386const generateHealthBadgeImageURL = () => {
389- return ` ${ serverUrl } /api/v1/endpoints/${ endpointStatus .value .key } /health/badge.svg`
387+ return ` /api/v1/endpoints/${ endpointStatus .value .key } /health/badge.svg`
390388}
391389
392390const generateUptimeBadgeImageURL = (duration ) => {
393- return ` ${ serverUrl } /api/v1/endpoints/${ endpointStatus .value .key } /uptimes/${ duration} /badge.svg`
391+ return ` /api/v1/endpoints/${ endpointStatus .value .key } /uptimes/${ duration} /badge.svg`
394392}
395393
396394const generateResponseTimeBadgeImageURL = (duration ) => {
397- return ` ${ serverUrl } /api/v1/endpoints/${ endpointStatus .value .key } /response-times/${ duration} /badge.svg`
395+ return ` /api/v1/endpoints/${ endpointStatus .value .key } /response-times/${ duration} /badge.svg`
398396}
399397
400398onMounted (() => {
0 commit comments