Skip to content

Commit

Permalink
Change status code for thumbnail upload to 204 (no_content).
Browse files Browse the repository at this point in the history
refs #359
  • Loading branch information
geso02 committed Sep 3, 2024
1 parent 75d5956 commit e4c86a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public ResponseEntity<Void> putThumbnailAasRepository(Base64UrlEncodedIdentifier
fileInputstream = file.getInputStream();
aasRepository.setThumbnail(aasIdentifier.getIdentifier(), fileName, file.getContentType(), fileInputstream);
closeInputStream(fileInputstream);
return new ResponseEntity<Void>(HttpStatus.OK);
return new ResponseEntity<Void>(HttpStatus.NO_CONTENT);
} catch (IOException e) {
closeInputStream(fileInputstream);
return new ResponseEntity<Void>(HttpStatus.INTERNAL_SERVER_ERROR);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ public void uploadThumbnailToShell() throws IOException {
createDummyAasOnServer(getAas1JSONString());
CloseableHttpResponse getThumbnailResponse = uploadThumbnail(dummyAasId);

assertEquals(HttpStatus.OK.value(), getThumbnailResponse.getCode());
assertEquals(HttpStatus.NO_CONTENT.value(), getThumbnailResponse.getCode());

getThumbnailResponse.close();
}
Expand Down

0 comments on commit e4c86a9

Please sign in to comment.