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.
 
 
 
 
 
 

18 lines
510 B

import { UserDTO } from './userData'
import { UserRepository } from '~/domain/models/user/userRepository'
export class UserApplicationService {
constructor(
private readonly repository: UserRepository
) {}
public async getMyProfile(): Promise<UserDTO> {
const item = await this.repository.getMe()
return new UserDTO(item)
}
public async list(query: string): Promise<UserDTO[]> {
const items = await this.repository.list(query)
return items.map(item => new UserDTO(item))
}
}