Perform request to absolute endpoint. #734.
This commit is contained in:
parent
927873a78e
commit
0e07408852
|
@ -105,7 +105,7 @@
|
|||
|
||||
<script>
|
||||
import { mapActions, mapGetters } from 'vuex';
|
||||
import { tainacan as axios } from '../../js/axios';
|
||||
import axios from 'axios';
|
||||
|
||||
export default {
|
||||
name: 'CollectionCreationModal',
|
||||
|
@ -116,11 +116,6 @@ export default {
|
|||
collectionPresets: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
hasPresetsHook() {
|
||||
this.selectedEstrategy = this.hasPresetsHook ? undefined : 'mappers';
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
metadatumMappers() {
|
||||
return this.getMetadatumMappers();
|
||||
|
@ -133,11 +128,16 @@ export default {
|
|||
},
|
||||
getPresetsHook() {
|
||||
if (wp !== undefined && wp.hooks !== undefined)
|
||||
this.collectionPresets = wp.hooks.applyFilters(`tainacan_collections_presets`, this.collectionPresets);
|
||||
return wp.hooks.applyFilters(`tainacan_collections_presets`, this.collectionPresets);
|
||||
|
||||
return this.collectionPresets;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
hasPresetsHook() {
|
||||
this.selectedEstrategy = this.hasPresetsHook ? undefined : 'mappers';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.isLoadingMetadatumTypes = true;
|
||||
|
||||
|
@ -161,10 +161,8 @@ export default {
|
|||
]),
|
||||
onNewCollectionPreset(collectionPreset) {
|
||||
axios.post(collectionPreset.endpoint)
|
||||
.then((response) => {
|
||||
console.log(response);
|
||||
|
||||
this.$router.push($routerHelper.getCollectionsPath());
|
||||
.then(() => {
|
||||
this.$router.push(this.$routerHelper.getCollectionsPath());
|
||||
this.$parent.close();
|
||||
})
|
||||
.catch((error) =>{
|
||||
|
|
Loading…
Reference in New Issue