You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
749 B

  1. import ApiService from '@/services/api.service'
  2. class LabelService {
  3. constructor() {
  4. this.request = ApiService
  5. }
  6. getLabelList(projectId) {
  7. return this.request.get(`/projects/${projectId}/labels`)
  8. }
  9. addLabel(projectId, payload) {
  10. return this.request.post(`/projects/${projectId}/labels`, payload)
  11. }
  12. deleteLabel(projectId, labelId) {
  13. return this.request.delete(`/projects/${projectId}/labels/${labelId}`)
  14. }
  15. updateLabel(projectId, labelId, payload) {
  16. return this.request.patch(`/projects/${projectId}/labels/${labelId}`, payload)
  17. }
  18. uploadFile(projectId, payload, config = {}) {
  19. return this.request.post(`/projects/${projectId}/label-upload`, payload, config)
  20. }
  21. }
  22. export default new LabelService()