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

delete account User id

parent 9e8dea0d
No related branches found
No related tags found
No related merge requests found
......@@ -66,4 +66,14 @@ public class AccountServiceController {
return new ResponseEntity<>(updatedUser, HttpStatus.OK);
}
@DeleteMapping("{id}")
public ResponseEntity<User> delete(@PathVariable("id") long userId){
User user = ephemeralStorage.deleteUserById(userId);
if(user == null){
return new ResponseEntity(HttpStatus.NOT_FOUND);
}else{
return new ResponseEntity<>(user,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