Merge pull request #13501 from nextcloud/enh/accessibility/to-nextcloud-axios

Move accessibility to nextcloud-axios
This commit is contained in:
Roeland Jago Douma 2019-01-11 10:17:35 +01:00 committed by GitHub
commit ef43c717fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 120 additions and 609 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -11,7 +11,7 @@
"build": "webpack --progress --hide-modules --config webpack.prod.js"
},
"dependencies": {
"axios": "^0.18.0",
"nextcloud-axios": "^0.1.3",
"vue": "^2.5.21"
},
"browserslist": [
@ -24,10 +24,10 @@
"babel-loader": "^8.0.5",
"css-loader": "^2.1.0",
"file-loader": "^3.0.1",
"vue-loader": "^15.5.0",
"vue-loader": "^15.5.1",
"vue-template-compiler": "^2.5.21",
"webpack": "^4.28.3",
"webpack-cli": "^3.2.0",
"webpack": "^4.28.4",
"webpack-cli": "^3.2.1",
"webpack-merge": "^4.2.1"
}
}

View File

@ -21,7 +21,7 @@
<script>
import preview from './components/itemPreview';
import axios from 'axios';
import axios from 'nextcloud-axios';
export default {
name: 'Accessibility',
@ -52,9 +52,6 @@ export default {
theme: this.serverData.theme,
font: this.serverData.font
};
},
tokenHeaders() {
return { headers: { requesttoken: OC.requestToken } };
}
},
methods: {
@ -75,8 +72,7 @@ export default {
selectItem(type, id) {
axios.post(
OC.linkToOCS('apps/accessibility/api/v1/config', 2) + type,
{ value: id },
this.tokenHeaders
{ value: id }
)
.then(response => {
this.serverData[type] = id;