libs/tasks/application/src/lib/use-cases/get-all-tasks.use-case.ts
Methods |
|
constructor(tasksService: TasksService)
|
||||||
Parameters :
|
Async execute |
execute()
|
Returns :
Promise<Task[]>
|
import { Injectable } from '@nestjs/common';
import { Task } from '@tasks/domain';
import { TasksService } from '../tasks.service';
@Injectable()
export class GetAllTasksUseCase {
constructor(private readonly tasksService: TasksService) {}
async execute(): Promise<Task[]> {
return await this.tasksService.findAll();
}
}