Fix protocol issues
This commit is contained in:
@ -6,16 +6,12 @@ import LoadingScreen from '@/components/LoadingScreen.vue'
|
||||
import CategoryPreview from '@/components/CategoryPreview.vue'
|
||||
|
||||
export default {
|
||||
inject: ['protocol'],
|
||||
async setup() {
|
||||
const protocol = import.meta.env.VITE_HTTPS === 'true' ? 'https://' : 'http://'
|
||||
|
||||
let data: Ref<any | undefined> = ref()
|
||||
let frontend_url = protocol + import.meta.env.VITE_INSTANCE_DOMAIN
|
||||
|
||||
return {
|
||||
data,
|
||||
protocol,
|
||||
frontend_url,
|
||||
filterTags: '',
|
||||
following: ref([])
|
||||
}
|
||||
@ -82,6 +78,10 @@ export default {
|
||||
|
||||
try {
|
||||
const res = await fetch(`${this.protocol}${import.meta.env.VITE_BACKEND_DOMAIN}/api/discover`)
|
||||
|
||||
console.log(this.protocol, this)
|
||||
console.log(import.meta.env)
|
||||
|
||||
const rawData = await res.json()
|
||||
if (rawData.status === 'ok') {
|
||||
this.data = rawData.data
|
||||
|
Reference in New Issue
Block a user