Skip to content
Snippets Groups Projects
Commit 9e8dea0d authored by Hisham's avatar Hisham
Browse files

delete task User id

parent fcfa336b
No related branches found
No related tags found
No related merge requests found
......@@ -82,4 +82,15 @@ public class TaskServiceController {
log.info("Updated tasks of user to assignment limit: {\n{}}", updatedTasks.toString());
return new ResponseEntity<>(updatedTasks, HttpStatus.OK);
}
@DeleteMapping("/user/{id}")
public ResponseEntity<List<Task>> delete(@PathVariable("id") long userId){
List<Task> task = ephemeralStorage.deleteTasksForUserWithId(userId);
if(task == null){
return new ResponseEntity(HttpStatus.NOT_FOUND);
}else{
return new ResponseEntity<>(task,HttpStatus.OK);
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment