Update axios requests to nativeHttp, add openid connect auth button

This commit is contained in:
advplyr
2023-09-25 17:30:39 -05:00
parent 00bed39733
commit 46f558d6e0
14 changed files with 128 additions and 14 deletions
+1 -1
View File
@@ -5,7 +5,7 @@
<script>
export default {
async asyncData({ params, app, store, redirect }) {
var series = await app.$axios.$get(`/api/series/${params.id}`).catch((error) => {
var series = await app.$nativeHttp.get(`/api/series/${params.id}`).catch((error) => {
console.error('Failed', error)
return false
})
+1 -1
View File
@@ -38,7 +38,7 @@ export default {
return redirect(`/connect?redirect=${route.path}`)
}
var collection = await app.$axios.$get(`/api/collections/${params.id}`).catch((error) => {
var collection = await app.$nativeHttp.get(`/api/collections/${params.id}`).catch((error) => {
console.error('Failed', error)
return false
})
+1 -1
View File
@@ -70,7 +70,7 @@ export default {
libraryItem = await app.$db.getLocalLibraryItem(libraryItemId)
console.log('Got lli', libraryItemId)
} else if (store.state.user.serverConnectionConfig) {
libraryItem = await app.$axios.$get(`/api/items/${libraryItemId}?expanded=1`).catch((error) => {
libraryItem = await app.$nativeHttp.get(`/api/items/${libraryItemId}?expanded=1`).catch((error) => {
console.error('Failed', error)
return false
})
+1 -1
View File
@@ -150,7 +150,7 @@ export default {
libraryItem = await app.$db.getLocalLibraryItem(libraryItemId)
console.log('Got lli', libraryItemId)
} else if (store.state.user.serverConnectionConfig) {
libraryItem = await app.$axios.$get(`/api/items/${libraryItemId}?expanded=1&include=rssfeed`).catch((error) => {
libraryItem = await app.$nativeHttp.get(`/api/items/${libraryItemId}?expanded=1&include=rssfeed`).catch((error) => {
console.error('Failed', error)
return false
})
+1 -1
View File
@@ -33,7 +33,7 @@ export default {
return redirect(`/connect?redirect=${route.path}`)
}
const playlist = await app.$axios.$get(`/api/playlists/${params.id}`).catch((error) => {
const playlist = await app.$nativeHttp.get(`/api/playlists/${params.id}`).catch((error) => {
console.error('Failed', error)
return false
})