getNewsPage加了jwtVerify
This commit is contained in:
parent
ed0cde6968
commit
2c12fc075f
@ -30,7 +30,8 @@ public class NewsController {
|
||||
}
|
||||
|
||||
@GetMapping("/{id}")
|
||||
public ResponseEntity<News> getNewsPage(@PathVariable Long id) {
|
||||
@JwtVerify
|
||||
public ResponseEntity<News> getNewsPage(@PathVariable Long id, @RequestParam String token) {
|
||||
try {
|
||||
return new ResponseEntity<>(newsService.getNewsById(id), HttpStatus.OK);
|
||||
} catch (EntityNotFoundException e) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user