File

libs/tasks/application/src/lib/use-cases/get-all-tasks.use-case.ts

Index

Methods

Constructor

constructor(tasksService: TasksService)
Parameters :
Name Type Optional
tasksService TasksService No

Methods

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();
  }
}

results matching ""

    No results matching ""