Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-12-07 15:57:50 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2018-12-07 15:57:50 +0300
commitc1f1dd18fc497a6dd456ceef19521e6d99b6752d (patch)
tree2fc4d308d4ca3aeaa12be27bfb7d818f02a22cf9 /apps/oauth2/src
parent1f492322a8b83c8a5f5aba44058218316ed2908b (diff)
Switch to nextcloud-axios for oauth2 app
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/oauth2/src')
-rw-r--r--apps/oauth2/src/App.vue19
1 files changed, 5 insertions, 14 deletions
diff --git a/apps/oauth2/src/App.vue b/apps/oauth2/src/App.vue
index c9c01fc11e0..036af6ca25f 100644
--- a/apps/oauth2/src/App.vue
+++ b/apps/oauth2/src/App.vue
@@ -54,7 +54,7 @@
</template>
<script>
-import axios from 'axios';
+import Axios from 'nextcloud-axios'
import OAuthItem from './components/OAuthItem';
export default {
@@ -74,36 +74,27 @@ export default {
};
},
beforeMount: function() {
- let requestToken = OC.requestToken;
- let tokenHeaders = { headers: { requesttoken: requestToken } };
-
- axios.get(OC.generateUrl('apps/oauth2/clients'), tokenHeaders)
+ Axios.get(OC.generateUrl('apps/oauth2/clients'))
.then((response) => {
this.clients = response.data;
});
},
methods: {
deleteClient(id) {
- let requestToken = OC.requestToken;
- let tokenHeaders = { headers: { requesttoken: requestToken } };
-
- axios.delete(OC.generateUrl('apps/oauth2/clients/{id}', {id: id}), tokenHeaders)
+ Axios.delete(OC.generateUrl('apps/oauth2/clients/{id}', {id: id}))
.then((response) => {
this.clients = this.clients.filter(client => client.id !== id);
});
},
addClient() {
- let requestToken = OC.requestToken;
- let tokenHeaders = { headers: { requesttoken: requestToken } };
this.newClient.error = false;
- axios.post(
+ Axios.post(
OC.generateUrl('apps/oauth2/clients'),
{
name: this.newClient.name,
redirectUri: this.newClient.redirectUri
- },
- tokenHeaders
+ }
).then(response => {
this.clients.push(response.data);