Add semrack index postgresql
All checks were successful
Maven build / build (push) Successful in 3m17s
All checks were successful
Maven build / build (push) Successful in 3m17s
This commit is contained in:
@@ -46,6 +46,11 @@
|
||||
<artifactId>quarkus-junit5-internal</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>fr.codeanddata.semrack</groupId>
|
||||
<artifactId>semrack-core-testing</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
package fr.codeanddata.semrack.api.rest;
|
||||
|
||||
import fr.codeanddata.semrack.core.SemdocStorage;
|
||||
import fr.codeanddata.semrack.core.models.SemrackDocument;
|
||||
import fr.codeanddata.semrack.core.models.PushDocumentRequest;
|
||||
import fr.codeanddata.semrack.core.models.SearchRequest;
|
||||
import fr.codeanddata.semrack.core.models.SearchResult;
|
||||
import fr.codeanddata.semrack.core.models.SemrackDocument;
|
||||
import fr.codeanddata.semrack.core.repositories.SemdocRepository;
|
||||
import io.smallrye.mutiny.Uni;
|
||||
import jakarta.inject.Inject;
|
||||
@@ -19,9 +18,6 @@ import org.jboss.resteasy.reactive.RestPath;
|
||||
//@Authenticated
|
||||
public class SemrackApi {
|
||||
|
||||
@Inject
|
||||
SemdocStorage storage;
|
||||
|
||||
@Inject
|
||||
SemdocRepository repository;
|
||||
|
||||
@@ -35,14 +31,14 @@ public class SemrackApi {
|
||||
@Path("/search")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public Uni<SearchResult> searchDocument(SearchRequest query) {
|
||||
return storage.searchDocument(query);
|
||||
return repository.searchDocument(query);
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("{uid}")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public Uni<SemrackDocument> getDocument(@RestPath String uid) {
|
||||
return storage.readDocument(uid);
|
||||
return repository.get(uid);
|
||||
}
|
||||
|
||||
@POST
|
||||
|
||||
Reference in New Issue
Block a user