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.

13 lines
361 B

  1. import { RoleDTO } from './roleData'
  2. import { RoleRepository } from '~/domain/models/role/roleRepository'
  3. export class RoleApplicationService {
  4. constructor(
  5. private readonly repository: RoleRepository
  6. ) {}
  7. public async list(): Promise<RoleDTO[]> {
  8. const items = await this.repository.list()
  9. return items.map(item => new RoleDTO(item))
  10. }
  11. }