File

libs/tasks/application/src/lib/use-cases/create-some-user-tasks.use-case.ts

Index

Methods

Constructor

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

Methods

Async execute
execute(userId: string, tasks: literal type[])
Parameters :
Name Type Optional
userId string No
tasks literal type[] No
Returns : Promise<string>
import { Injectable } from '@nestjs/common';
import { UserTasksService } from '../user-tasks.service';

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

  async execute(
    userId: string,
    tasks: { id: string; createdAt: Date }[],
  ): Promise<string> {
    return await this.userTasksService.createSome(userId, tasks);
  }
}

results matching ""

    No results matching ""