Updated /api/posts/raw' API
All checks were successful
bit / docker (push) Successful in 50s

This commit is contained in:
Marco Cetica 2024-03-21 11:14:16 +01:00
parent 2ec05c4dfa
commit 8666383048
Signed by: marco
GPG Key ID: 45060A949E90D0FD
3 changed files with 4 additions and 6 deletions

View File

@ -62,7 +62,7 @@
<dependency> <dependency>
<groupId>com.fasterxml.jackson.core</groupId> <groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId> <artifactId>jackson-core</artifactId>
<version>2.16.1</version> <version>2.16.2</version>
</dependency> </dependency>
</dependencies> </dependencies>

View File

@ -73,10 +73,8 @@ public class PostController {
throw new GenericErrorException(res.getLeft().getMessage(), "error"); throw new GenericErrorException(res.getLeft().getMessage(), "error");
} }
var content = res.get().getContent(); var content = "<pre>" + res.get().getContent() + "</pre>";
var jsonOutput = new JsonEmitter<>(content).emitJsonKey(); return new ResponseEntity<>(content, HttpStatus.OK);
return new ResponseEntity<>(jsonOutput, HttpStatus.OK);
} }
/** /**

View File

@ -36,7 +36,7 @@ public class UserController {
/** /**
* Get all users if user is PRIVILEGED * Get all users if user is PRIVILEGED
* *
* @Param user the email and the password * @param user the email and the password
* @return on success, the list of users, on failure the error message * @return on success, the list of users, on failure the error message
*/ */
@GetMapping("/api/users") @GetMapping("/api/users")