aboutsummaryrefslogtreecommitdiff
path: root/resources/vue/components/CacheAdministration.vue
diff options
context:
space:
mode:
Diffstat (limited to 'resources/vue/components/CacheAdministration.vue')
-rw-r--r--resources/vue/components/CacheAdministration.vue34
1 files changed, 17 insertions, 17 deletions
diff --git a/resources/vue/components/CacheAdministration.vue b/resources/vue/components/CacheAdministration.vue
index af3d461..5da9568 100644
--- a/resources/vue/components/CacheAdministration.vue
+++ b/resources/vue/components/CacheAdministration.vue
@@ -82,24 +82,24 @@ export default {
* @param event
*/
getCacheConfig (event) {
- fetch(STUDIP.URLHelper.getURL(`dispatch.php/admin/cache/get_config/${this.selectedCacheType}`))
- .then((response) => {
- if (!response.ok) {
- throw response
- }
+ const url = STUDIP.URLHelper.getURL(
+ 'dispatch.php/admin/cache/get_config',
+ {cache: this.selectedCacheType},
+ true
+ );
+ fetch(url).then((response) => {
+ if (!response.ok) {
+ throw response
+ }
- response.json()
- .then((json) => {
- this.configComponent = json.component
- this.configProps = json.props
- }).catch((error) => {
- console.error(error)
- console.error(error.status + ': ', error.statusText)
- })
- }).catch((error) => {
- console.error(error)
- console.error(error.status + ': ', error.statusText)
- })
+ response.json().then((json) => {
+ this.configComponent = json.component
+ this.configProps = json.props
+ });
+ }).catch((error) => {
+ console.error(error)
+ console.error(error.status + ': ', error.statusText)
+ })
},
validateConfig () {
if (this.configComponent == null || this.isValid) {