File

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

Index

Methods

Constructor

constructor(userTasksService: UserTasksService)
Parameters :
Name Type Optional
userTasksService UserTasksService No

Methods

Async execute
execute(userId: string)
Parameters :
Name Type Optional
userId string No
Returns : Promise<UserTask[]>
import { Injectable } from "@nestjs/common";
import { UserTask } from "@tasks/domain";

import { UserTasksService } from "../user-tasks.service";

@Injectable()
export class GetAllUserTasksUseCase {
  constructor(private readonly userTasksService: UserTasksService) {}

  async execute(userId: string): Promise<UserTask[]> {
    return await this.userTasksService.findMany(userId);
  }
}

results matching ""

    No results matching ""