libs/tasks/application/src/lib/tasks.service.ts
Methods |
|
constructor(tasksRepository: TasksRepository)
|
||||||
Parameters :
|
Async findAll |
findAll()
|
Returns :
Promise<Task[]>
|
import { Inject, Injectable } from '@nestjs/common';
import { Task, TASKS_REPOSITORY, TasksRepository } from '@tasks/domain';
@Injectable()
export class TasksService {
constructor(
@Inject(TASKS_REPOSITORY)
private readonly tasksRepository: TasksRepository,
) {}
async findAll(): Promise<Task[]> {
return await this.tasksRepository.findAll();
}
}