Fix remote search
This commit is contained in:
parent
37278348fb
commit
778d2fcbd4
|
@ -350,7 +350,7 @@ def fetch(fetch_obj):
|
|||
return error(
|
||||
"http",
|
||||
status_code=e.response.status_code if e.response else None,
|
||||
message=response.text,
|
||||
message=e.response.text,
|
||||
)
|
||||
except requests.exceptions.Timeout:
|
||||
return error("timeout")
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Fix remote search (#1857)
|
|
@ -1,11 +1,14 @@
|
|||
<script setup lang="ts">
|
||||
import type { BackendError } from '~/types'
|
||||
|
||||
import axios from 'axios'
|
||||
import { useStore } from '~/store'
|
||||
import { ref, computed, watch, watchEffect } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useGettext } from 'vue3-gettext'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useStore } from '~/store'
|
||||
|
||||
import axios from 'axios'
|
||||
|
||||
import updateQueryString from '~/composables/updateQueryString'
|
||||
|
||||
type Type = 'rss' | 'artists' | 'both'
|
||||
|
||||
|
@ -99,10 +102,10 @@ const submit = () => {
|
|||
|
||||
const isLoading = ref(false)
|
||||
const createFetch = async () => {
|
||||
console.log(id.value, props.standalone)
|
||||
if (!id.value) return
|
||||
if (props.standalone) {
|
||||
// TODO (wvffle): Check if this needs to be handled
|
||||
return router.replace({ name: 'search', query: { id: id.value } })
|
||||
history.replaceState(history.state, '', updateQueryString(location.href, 'id', id.value))
|
||||
}
|
||||
|
||||
obj.value = undefined
|
||||
|
@ -128,8 +131,7 @@ const store = useStore()
|
|||
const rssSubscribe = async () => {
|
||||
if (!id.value) return
|
||||
if (props.standalone) {
|
||||
// TODO (wvffle): Check if this needs to be handled
|
||||
return router.replace({ name: 'search', query: { id: id.value, type: 'rss' } })
|
||||
history.replaceState(history.state, '', updateQueryString(location.href, 'id', id.value))
|
||||
}
|
||||
|
||||
obj.value = undefined
|
||||
|
|
Loading…
Reference in New Issue