Skip to content

Commit

Permalink
fix: adjusting task deadline verification
Browse files Browse the repository at this point in the history
  • Loading branch information
jpcchaves committed Mar 13, 2023
1 parent 4ccbea3 commit e31aed9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/ws/taskmanager/services/TaskService.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public TaskPatchDTO updateTaskSituation(UUID id, TaskPatchDTO taskPatchDTO) thro

var entity = taskRepository.findById(id).orElseThrow(() -> new ResourceNotFoundException("Não é possível deletar essa task pois ela não existe!"));

if(entity.getDeadline().isAfter(LocalDateTime.now(ZoneId.of("UTC")))) {
if(entity.getDeadline().isBefore(LocalDateTime.now(ZoneId.of("UTC")))) {
throw new BadRequestException("Não é possível atualizar a situaçao da tarefa porque seu prazo já está expirado!");
}

Expand Down

1 comment on commit e31aed9

@vercel
Copy link

@vercel vercel bot commented on e31aed9 Mar 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.