mirror of
https://github.com/JanGross/quicknotes.git
synced 2025-11-30 23:37:16 +01:00
p.s: I would like to be able to select a particular tag to show, but none of the dashboard widgets are configurable. I hate increasing the app size from 300k to almost 3 mb for something so simple, but we must adapt to the majority and use vue here.
22 lines
478 B
JavaScript
22 lines
478 B
JavaScript
import axios from '@nextcloud/axios'
|
|
import { generateUrl } from '@nextcloud/router'
|
|
import { showError } from '@nextcloud/dialogs'
|
|
|
|
function url(url) {
|
|
url = `apps/quicknotes${url}`
|
|
return generateUrl(url)
|
|
}
|
|
|
|
export const getDashboardData = () => {
|
|
return axios
|
|
.get(url('/notes/dashboard'))
|
|
.then(response => {
|
|
return response.data
|
|
})
|
|
.catch(err => {
|
|
console.error(err)
|
|
showError(t('notes', 'Fetching notes for dashboard has failed.'))
|
|
throw err
|
|
})
|
|
}
|