Skip to content

Commit

Permalink
archive-mgr: product code added to the mvc controller
Browse files Browse the repository at this point in the history
  • Loading branch information
DenChaykovskiy committed Apr 19, 2024
1 parent d87e2ed commit 7e78125
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public ResponseEntity<RestProductArchive> createArchive(RestProductArchive archi
/**
* List of all product archives with no search criteria
*
* @param code the product archive code
* @param name the product archive name
* @param archiveType the product archive type
* @param recordFrom first record of filtered and ordered result to return
Expand All @@ -70,13 +71,13 @@ public ResponseEntity<RestProductArchive> createArchive(RestProductArchive archi
* indicating failure
*/
@Override
public ResponseEntity<List<RestProductArchive>> getArchives(String name, String archiveType, Integer recordFrom, Integer recordTo) {
public ResponseEntity<List<RestProductArchive>> getArchives(String code, String name, String archiveType, Integer recordFrom, Integer recordTo) {

if (logger.isTraceEnabled())
logger.trace(">>> getArchives( {}, {}, {}, {})", name, archiveType, recordFrom, recordTo);
logger.trace(">>> getArchives({}, {}, {}, {}, {})", code, name, archiveType, recordFrom, recordTo);

try {
return new ResponseEntity<>(productArchiveManager.getArchives(name, archiveType, recordFrom, recordTo), HttpStatus.OK);
return new ResponseEntity<>(productArchiveManager.getArchives(code, name, archiveType, recordFrom, recordTo), HttpStatus.OK);

} catch (NoResultException e) {
return new ResponseEntity<>(http.errorHeaders(e.getMessage()), HttpStatus.NOT_FOUND);
Expand Down

0 comments on commit 7e78125

Please sign in to comment.