diff --git a/frontend/domain/models/download/downloadRepository.ts b/frontend/domain/models/download/downloadRepository.ts deleted file mode 100644 index 77a69c11..00000000 --- a/frontend/domain/models/download/downloadRepository.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface DownloadRepository { - prepare(projectId: string, format: string, exportApproved: boolean): Promise - - download(projectId: string, taskId: string): void -} diff --git a/frontend/pages/projects/_id/dataset/export.vue b/frontend/pages/projects/_id/dataset/export.vue index f10126fe..40edc075 100644 --- a/frontend/pages/projects/_id/dataset/export.vue +++ b/frontend/pages/projects/_id/dataset/export.vue @@ -93,7 +93,7 @@ export default Vue.extend({ async downloadRequest() { this.isProcessing = true - this.taskId = await this.$services.download.request( + this.taskId = await this.$repositories.download.prepare( this.projectId, this.selectedFormat, this.exportApproved @@ -107,7 +107,7 @@ export default Vue.extend({ if (this.taskId) { const res = await this.$repositories.taskStatus.get(this.taskId) if (res.ready) { - this.$services.download.download(this.projectId, this.taskId) + this.$repositories.download.download(this.projectId, this.taskId) this.reset() } } diff --git a/frontend/plugins/services.ts b/frontend/plugins/services.ts index bd88d893..b54cb260 100644 --- a/frontend/plugins/services.ts +++ b/frontend/plugins/services.ts @@ -2,7 +2,6 @@ import { Plugin } from '@nuxt/types' import { repositories } from './repositories' import { ConfigApplicationService } from '@/services/application/autoLabeling/configApplicationService' import { CommentApplicationService } from '@/services/application/comment/commentApplicationService' -import { DownloadApplicationService } from '@/services/application/download/downloadApplicationService' import { ExampleApplicationService } from '@/services/application/example/exampleApplicationService' import { LabelApplicationService } from '@/services/application/label/labelApplicationService' import { MemberApplicationService } from '@/services/application/member/memberApplicationService' @@ -28,7 +27,6 @@ export interface Services { seq2seq: Seq2seqApplicationService option: OptionApplicationService config: ConfigApplicationService - download: DownloadApplicationService tag: TagApplicationService bbox: BoundingBoxApplicationService segmentation: SegmentationApplicationService @@ -57,7 +55,6 @@ const plugin: Plugin = (_, inject) => { seq2seq: new Seq2seqApplicationService(repositories.textLabel), option: new OptionApplicationService(repositories.option), config: new ConfigApplicationService(repositories.config), - download: new DownloadApplicationService(repositories.download), tag: new TagApplicationService(repositories.tag), bbox: new BoundingBoxApplicationService(repositories.boundingBox), segmentation: new SegmentationApplicationService(repositories.segmentation) diff --git a/frontend/repositories/download/apiDownloadRepository.ts b/frontend/repositories/download/apiDownloadRepository.ts index a1827110..60fe3e21 100644 --- a/frontend/repositories/download/apiDownloadRepository.ts +++ b/frontend/repositories/download/apiDownloadRepository.ts @@ -1,7 +1,6 @@ import ApiService from '@/services/api.service' -import { DownloadRepository } from '@/domain/models/download/downloadRepository' -export class APIDownloadRepository implements DownloadRepository { +export class APIDownloadRepository { constructor(private readonly request = ApiService) {} async prepare(projectId: string, format: string, exportApproved: boolean): Promise { diff --git a/frontend/services/application/download/downloadApplicationService.ts b/frontend/services/application/download/downloadApplicationService.ts deleted file mode 100644 index d636e5a9..00000000 --- a/frontend/services/application/download/downloadApplicationService.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { DownloadRepository } from '~/domain/models/download/downloadRepository' - -export class DownloadApplicationService { - constructor(private readonly repository: DownloadRepository) {} - - public async request( - projectId: string, - format: string, - exportApproved: boolean - ): Promise { - const item = await this.repository.prepare(projectId, format, exportApproved) - return item - } - - public download(projectId: string, taskId: string): void { - this.repository.download(projectId, taskId) - } -}