Skip to content

Commit

Permalink
fix: Update deleteTask method parameter name to taskId
Browse files Browse the repository at this point in the history
  • Loading branch information
Daaaiii committed Jun 5, 2024
1 parent 9e0d02d commit bed88b6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/modules/task/task.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,13 @@ export class TaskService {
}

async deleteTask(input: iTaskRepositoryDeleteTaskInput) {
const taskId = parseInt(input.id);
const childrenId = parseInt(input.childrenId);
const { taskId, childrenId, parentId } = input;

const existingTask = await this.repository.findTaskByIdAndChildren(
taskId,
childrenId,
);
const parent = await this.repository.validateParent(input.parentId);
const parent = await this.repository.validateParent(parentId);

if (!existingTask) {
throw new CustomHttpError('Tarefa não encontrada', 404);
Expand Down

0 comments on commit bed88b6

Please sign in to comment.