- Terraform Private Registry v0.0.1 + Terraform Private Registry v0.2.0
- Terraform Private Registry v0.0.1 + Terraform Private Registry v0.2.0
{ const [loading, setLoading] = useState(false); const [distanceBottom, setDistanceBottom] = useState(0); - const hasMoreData = (lastEvaluatedItem: any) => { - return !!lastEvaluatedItem && modules.at(0)?.id !== lastEvaluatedItem; + const hasMoreData = (lastEvaluatedItemId: string) => { + return !!lastEvaluatedItemId && modules.at(0)?.id !== lastEvaluatedItemId; }; const loadMore = useCallback( () => { setLoading(true); fetchModules( - `search/modules?limit=${fetchDataLimit}&lastKey=${lastEvaluatedItemKey}&q=${searchString}` + `search/modules?limit=${fetchDataLimit}&lastKey=${encodeURIComponent( + lastEvaluatedItemKey + )}&q=${searchString}` ).then((data) => { const allModules = [...modules, ...data.entities]; setLastEvaluatedItemKey( diff --git a/src/test/java/core/vertx/event/consumer/DownloadListenerTest.java b/src/test/java/core/vertx/event/consumer/DownloadListenerTest.java index 7f0c2fa4..9a9ce541 100644 --- a/src/test/java/core/vertx/event/consumer/DownloadListenerTest.java +++ b/src/test/java/core/vertx/event/consumer/DownloadListenerTest.java @@ -5,7 +5,6 @@ import core.backend.aws.dynamodb.repository.DynamodbRepository; import core.terraform.Module; import io.quarkus.test.junit.QuarkusTest; -import java.io.IOException; import javax.inject.Inject; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; @@ -41,7 +40,7 @@ void tearDown() { } @Test - void handleDownloadRequestedEvent() throws IOException { + void handleDownloadRequestedEvent() throws Exception { repository.ingestModuleData(fakeModule); assertEquals(fakeModule.getDownloads(), 0); fakeModule = dl.handleDownloadRequestedEvent(fakeModule);