Compare commits
No commits in common. "2c12fc075f75862170006685e1d7be13698a5076" and "e66695cbff365dc87f1064f3287670ef638c24f7" have entirely different histories.
2c12fc075f
...
e66695cbff
@ -30,8 +30,7 @@ public class NewsController {
|
||||
}
|
||||
|
||||
@GetMapping("/{id}")
|
||||
@JwtVerify
|
||||
public ResponseEntity<News> getNewsPage(@PathVariable Long id, @RequestParam String token) {
|
||||
public ResponseEntity<News> getNewsPage(@PathVariable Long id) {
|
||||
try {
|
||||
return new ResponseEntity<>(newsService.getNewsById(id), HttpStatus.OK);
|
||||
} catch (EntityNotFoundException e) {
|
||||
|
||||
@ -58,7 +58,6 @@ public class NewsService {
|
||||
news.setContent(request.getContent());
|
||||
news.setAuthor(request.getAuthor());
|
||||
news.setImagePath(request.getImagePath());
|
||||
news.setTenant(request.getTenant());
|
||||
newsRepository.save(news);
|
||||
}
|
||||
|
||||
@ -70,7 +69,6 @@ public class NewsService {
|
||||
news.setContent(request.getContent());
|
||||
news.setAuthor(request.getAuthor());
|
||||
news.setImagePath(request.getImagePath());
|
||||
news.setTenant(request.getTenant());
|
||||
newsRepository.save(news);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user