Browse Source

Remove unused tag dto

pull/2149/head
Hironsan 1 year ago
parent
commit
9c778a495c
2 changed files with 0 additions and 27 deletions
  1. 14
      frontend/services/application/tag/tagApplicationService.ts
  2. 13
      frontend/services/application/tag/tagData.ts

14
frontend/services/application/tag/tagApplicationService.ts

@ -1,22 +1,8 @@
import { TagDTO } from './tagData'
import { TagRepository } from '~/domain/models/tag/tagRepository' import { TagRepository } from '~/domain/models/tag/tagRepository'
export class TagApplicationService { export class TagApplicationService {
constructor(private readonly repository: TagRepository) {} constructor(private readonly repository: TagRepository) {}
public async list(id: string): Promise<TagDTO[]> {
const items = await this.repository.list(id)
return items.map((item) => new TagDTO(item))
}
public async create(projectId: string, text: string): Promise<void> {
await this.repository.create(projectId, text)
}
public async delete(projectId: string, id: number): Promise<void> {
return await this.repository.delete(projectId, id)
}
public async bulkUpdate(projectId: string | number, tags: string[]): Promise<void> { public async bulkUpdate(projectId: string | number, tags: string[]): Promise<void> {
const currentTags = await this.repository.list(projectId) const currentTags = await this.repository.list(projectId)
const currentTagNames = currentTags.map((tag) => tag.text) const currentTagNames = currentTags.map((tag) => tag.text)

13
frontend/services/application/tag/tagData.ts

@ -1,13 +0,0 @@
import { TagItem } from '~/domain/models/tag/tag'
export class TagDTO {
id: number
text: string
project: string | number
constructor(item: TagItem) {
this.id = item.id
this.text = item.text
this.project = item.project
}
}
Loading…
Cancel
Save