Compare commits

..

No commits in common. "e4a11a8a53fdd727a3e8ace2c02098c8d58d85ee" and "3a7b6ee605f8aff295b6018c8725aaf75e2022f1" have entirely different histories.

2 changed files with 3 additions and 3 deletions

View File

@ -38,7 +38,7 @@ public class NewsController {
@PutMapping("/{id}")
@JwtVerify
public ResponseEntity<MessageResponse> updateNews(@PathVariable Long id, @RequestBody NewsRequest request) {
public ResponseEntity<MessageResponse> updateNews(@RequestBody NewsRequest request, @PathVariable Long id) {
try {
newsService.updateNews(id, request);
} catch (DataIntegrityViolationException e) {

View File

@ -8,7 +8,7 @@ import org.springframework.stereotype.Component;
@Aspect
@Component
public class JwtVerifyAspect {
@Before("@annotation(JwtVerify)&&args(..)")
@Before("@annotation(JwtVerify)")
public void verifyJwtToken(JoinPoint joinPoint) throws JwtValidationException {
Object[] args = joinPoint.getArgs();
for (Object arg : args) {
@ -17,8 +17,8 @@ public class JwtVerifyAspect {
if (!JwtUtil.isTokenValid(token)) {
throw new JwtValidationException("JWT token is invalid");
}
break;
}
break;
}
}
}