Skip to content
Snippets Groups Projects
Commit 5e03af1f authored by Hisham's avatar Hisham
Browse files

hallo

parent 8a81c8e3
No related branches found
No related tags found
No related merge requests found
......@@ -36,8 +36,13 @@ public class TaskServiceController {
}
@GetMapping("/user/{id}")
public List<Task> GetTaskUserId(@PathVariable("id") long userId){
return ephemeralStorage.getTasksForUserWithId(userId);
public ResponseEntity<List<Task>> GetTaskUserId(@PathVariable("id") long userId){
List<Task> tmp = ephemeralStorage.getTasksForUserWithId(userId);
if(tmp == null){
return new ResponseEntity<>(HttpStatus.NOT_FOUND);
}else{
return new ResponseEntity<>(tmp,HttpStatus.OK);
}
}
@PostMapping
......
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