Import router
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
ecfa6f7e0c
commit
a2a538bc2f
|
@ -75,6 +75,7 @@
|
||||||
<script>
|
<script>
|
||||||
import axios from 'nextcloud-axios'
|
import axios from 'nextcloud-axios'
|
||||||
import OAuthItem from './components/OAuthItem'
|
import OAuthItem from './components/OAuthItem'
|
||||||
|
import { generateUrl } from 'nextcloud-router'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'App',
|
name: 'App',
|
||||||
|
@ -99,7 +100,7 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
deleteClient(id) {
|
deleteClient(id) {
|
||||||
axios.delete(OC.generateUrl('apps/oauth2/clients/{id}', { id: id }))
|
axios.delete(generateUrl('apps/oauth2/clients/{id}', { id: id }))
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
this.clients = this.clients.filter(client => client.id !== id)
|
this.clients = this.clients.filter(client => client.id !== id)
|
||||||
})
|
})
|
||||||
|
@ -108,7 +109,7 @@ export default {
|
||||||
this.newClient.error = false
|
this.newClient.error = false
|
||||||
|
|
||||||
axios.post(
|
axios.post(
|
||||||
OC.generateUrl('apps/oauth2/clients'),
|
generateUrl('apps/oauth2/clients'),
|
||||||
{
|
{
|
||||||
name: this.newClient.name,
|
name: this.newClient.name,
|
||||||
redirectUri: this.newClient.redirectUri
|
redirectUri: this.newClient.redirectUri
|
||||||
|
|
Loading…
Reference in New Issue