cattr-app/server-application

View on GitHub
resources/frontend/core/modules/Invitations/services/invitation.service.js

Summary

Maintainability
A
0 mins
Test Coverage
import ResourceService from '@/services/resource.service';
import axios from 'axios';

export default class InvitationService extends ResourceService {
    getAll(config = {}) {
        return axios.get('invitations/list', config);
    }

    save(data, isNew = false) {
        return axios.post(`invitations/${isNew ? 'create' : 'edit'}`, data);
    }

    resend(id) {
        return axios.post('invitations/resend', { id });
    }

    deleteItem(id) {
        return axios.post('invitations/remove', { id });
    }

    getWithFilters(filters, config = {}) {
        return axios.post('invitations/list', filters, config);
    }
}