diff --git a/frontend/services/config.service.js b/frontend/services/config.service.js new file mode 100644 index 00000000..4da7bf6e --- /dev/null +++ b/frontend/services/config.service.js @@ -0,0 +1,25 @@ +import ApiService from '@/services/api.service' + +class ConfigService { + constructor() { + this.request = ApiService + } + + getConfigList({ projectId }) { + return this.request.get(`/projects/${projectId}/auto-labeling-configs`) + } + + addConfig(projectId, payload) { + return this.request.post(`/projects/${projectId}/auto-labeling-configs`, payload) + } + + deleteConfig(projectId, configId) { + return this.request.delete(`/projects/${projectId}/auto-labeling-configs/${configId}`) + } + + updateConfig(projectId, configId, payload) { + return this.request.patch(`/projects/${projectId}/auto-labeling-configs/${configId}`, payload) + } +} + +export default new ConfigService()