From bc261edf6f8646fd73978aa0931d579da1a3ebbf Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Mon, 23 Nov 2020 22:28:38 +0100 Subject: [PATCH] fix dashboard requesttoken --- appinfo/info.xml | 2 +- src/components/Dashboard.vue | 3 +++ src/components/Main.vue | 22 ++++------------------ 3 files changed, 8 insertions(+), 19 deletions(-) diff --git a/appinfo/info.xml b/appinfo/info.xml index ffd5608..2473fb2 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -5,7 +5,7 @@ Radio Radio listening app Listening to your favorite radio stations in Nextcloud - 1.0.0 + 1.0.1 AGPL Jonas Heinrich Radio diff --git a/src/components/Dashboard.vue b/src/components/Dashboard.vue index f323dc0..ea93711 100644 --- a/src/components/Dashboard.vue +++ b/src/components/Dashboard.vue @@ -22,6 +22,8 @@ import { showError } from '@nextcloud/dialogs' import { DashboardWidget } from '@nextcloud/vue-dashboard' import EmptyContent from '@nextcloud/vue/dist/Components/EmptyContent' +const requesttoken = axios.defaults.headers.requesttoken + export default { name: 'Dashboard', @@ -84,6 +86,7 @@ export default { methods: { fetchNotifications() { const req = {} + axios.defaults.headers.requesttoken = requesttoken axios.get(generateUrl('/apps/radio/api/favorites'), req).then((response) => { this.processNotifications(response.data) this.state = 'ok' diff --git a/src/components/Main.vue b/src/components/Main.vue index 2e90bda..bcd83f3 100644 --- a/src/components/Main.vue +++ b/src/components/Main.vue @@ -23,13 +23,10 @@ -<<<<<<< HEAD -======= ->>>>>>> nc20 @@ -37,23 +34,15 @@ import Content from '@nextcloud/vue/dist/Components/Content' import AppContent from '@nextcloud/vue/dist/Components/AppContent' import EmptyContent from '@nextcloud/vue/dist/Components/EmptyContent' -<<<<<<< HEAD -import Navigation from './Navigation' -import Table from './Table' -import { Howl } from 'howler' - -======= ->>>>>>> nc20 -import { generateUrl } from '@nextcloud/router' -import { showError } from '@nextcloud/dialogs' -import axios from '@nextcloud/axios' - import Navigation from './Navigation' import Table from './Table' import Sidebar from './Sidebar' - import { Howl, Howler } from 'howler' +import { generateUrl } from '@nextcloud/router' +import { showError } from '@nextcloud/dialogs' +import axios from '@nextcloud/axios' + let audioPlayer = null const requesttoken = axios.defaults.headers.requesttoken @@ -65,10 +54,7 @@ export default { AppContent, Table, EmptyContent, -<<<<<<< HEAD -======= Sidebar, ->>>>>>> nc20 }, data: () => ({ tableData: [],