Skip to content
Snippets Groups Projects
featureType-api.js 461 B
Newer Older
Timothee P's avatar
Timothee P committed
import axios from '@/axios-client.js';
import store from '@/store';

const baseUrl = store.state.configuration.VUE_APP_DJANGO_API_BASE;

const featureTypeAPI = {
  async deleteFeatureType(featureType_slug) {
    const response = await axios.delete(
      `${baseUrl}v2/feature-types/${featureType_slug}`
    );
    if (
      response.status === 204
    ) {
Timothee P's avatar
Timothee P committed
      return 'success';
    } else {
      return null;
    }
  },

Timothee P's avatar
Timothee P committed
};

export default featureTypeAPI;