Skip to content

Commit

Permalink
[MODINVSTOR-1243] Fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
Saba-Zedginidze-EPAM committed Aug 26, 2024
1 parent 8a30a47 commit 4d89887
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 17 deletions.
24 changes: 12 additions & 12 deletions ramls/inventory.raml
Original file line number Diff line number Diff line change
Expand Up @@ -295,18 +295,18 @@ resourceTypes:
Possible values of the 'relations' parameter are: 'onlyBoundWiths', 'onlyBoundWithsSkipDirectlyLinkedItem'",
example: "holdingsRecordId==\"[UUID]\""}
]
/tenant-items:
displayName: Fetch items based on tenant IDs
post:
body:
application/json:
type: tenantItemPairCollection
responses:
200:
description: "Fetched items based on tenant IDs"
body:
application/json:
type: items
/tenant-items:
displayName: Fetch items based on tenant IDs
post:
body:
application/json:
type: tenantItemPairCollection
responses:
200:
description: "Fetched items based on tenant IDs"
body:
application/json:
type: items
/holdings/{holdingsId}:
put:
description: Update Holdings by holdingsId
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/folio/inventory/InventoryVerticle.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public void start(Promise<Void> started) {
new InventoryConfigApi().register(router);
new TenantApi().register(router);
new UpdateOwnershipApi(storage, client, consortiumService).register(router);
new TenantItems(storage, client).register(router);
new TenantItems(client).register(router);

Handler<AsyncResult<HttpServer>> onHttpServerStart = result -> {
if (result.succeeded()) {
Expand Down
9 changes: 5 additions & 4 deletions src/main/java/org/folio/inventory/resources/TenantItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,20 @@
import io.vertx.ext.web.RoutingContext;
import io.vertx.ext.web.client.WebClient;

public class TenantItems extends AbstractInventoryResource {
public class TenantItems {

private static final Logger log = LogManager.getLogger(MethodHandles.lookup().lookupClass());

private static final String TENANT_ITEMS_PATH = "/inventory/tenant-items";
public static final String ITEMS_FIELD = "items";
public static final String TOTAL_RECORDS_FIELD = "totalRecords";

public TenantItems(Storage storage, HttpClient client) {
super(storage, client);
private final HttpClient client;

public TenantItems(HttpClient client) {
this.client = client;
}

@Override
public void register(Router router) {
router.post(TENANT_ITEMS_PATH).handler(this::getItemsFromTenants);
}
Expand Down

0 comments on commit 4d89887

Please sign in to comment.