mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 07:09:16 +02:00
Fixed #119: forced redirection to login even with API_AUTHENTICATION_REQUIRED=False
This commit is contained in:
parent
0f5b1c295e
commit
4298c4236e
6 changed files with 14 additions and 3 deletions
|
@ -5,7 +5,7 @@
|
|||
<router-link class="ui item" to="/library/artists" exact>Artists</router-link>
|
||||
<router-link class="ui item" to="/library/radios" exact>Radios</router-link>
|
||||
<div class="ui secondary right menu">
|
||||
<router-link class="ui item" to="/library/requests/" exact>
|
||||
<router-link v-if="$store.state.auth.authenticated" class="ui item" to="/library/requests/" exact>
|
||||
Requests
|
||||
<div class="ui teal label">{{ requestsCount }}</div>
|
||||
</router-link>
|
||||
|
@ -32,8 +32,11 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
fetchRequestsCount () {
|
||||
if (!this.$store.state.authenticated) {
|
||||
return
|
||||
}
|
||||
let self = this
|
||||
axios.get('requests/import-requests', {params: {status: 'pending'}}).then(response => {
|
||||
axios.get('requests/import-requests/', {params: {status: 'pending'}}).then(response => {
|
||||
self.requestsCount = response.data.count
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue