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.

11 lines
355 B

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