Skip to content
Snippets Groups Projects

Javadoc

Merged Vilde Min Vikan requested to merge javadoc into main
10 files
+ 423
68
Compare changes
  • Side-by-side
  • Inline
Files
10
@@ -352,8 +352,8 @@ public class TrivioController {
try {
long userId = Long.parseLong(jwtService.extractSubjectFromHeader(token));
Trivio trivio = trivioService.getTrivioById(trivioId);
if (userId == trivio.getUser().getId()) {
trivioService.removeUserFromTrivio(trivioId, username);
if(userId == trivio.getUser().getId()){
trivioService.removeUserFromTrivioEditorList(trivioId, username);
return ResponseEntity.ok("User removed!");
}
return ResponseEntity.status(HttpStatus.UNAUTHORIZED).body("User is not authorized to perform this action.");
Loading