From 14d103313ffce0c75b0a43f2a0aa55f154c11200 Mon Sep 17 00:00:00 2001 From: Hironsan Date: Fri, 5 Feb 2021 15:20:24 +0900 Subject: [PATCH] Add config.service.js --- frontend/services/config.service.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 frontend/services/config.service.js 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()