File

libs/tasks/application/src/lib/use-cases/update-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, userTasks: literal type[])
Parameters :
Name Type Optional
userId string No
userTasks literal type[] No
Returns : Promise<string>
import { Injectable } from '@nestjs/common';
import { UserTasksService } from '../user-tasks.service';

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

  async execute(
    userId: string,
    userTasks: { id: string; updatedAt: Date }[],
  ): Promise<string> {
    return await this.userTasksService.updateSome(userId, userTasks);
  }
}

results matching ""

    No results matching ""