Merged in feature/testquery (pull request #39)
Test Query * depstextandclean * startedcleaningresult * resulttidyup * roundone * cleaning * unsyncedquery * startedtestsandsimplification * api * querytests * resultprocessortests * unittests * cleanup
This commit is contained in:
@@ -4,16 +4,14 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"queryorchestration/internal/query"
|
||||
queryprocessor "queryorchestration/internal/query/processor"
|
||||
resultprocessor "queryorchestration/internal/query/result/processor"
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/oapi-codegen/runtime/types"
|
||||
)
|
||||
|
||||
func (s *Controllers) ListQueries(ctx echo.Context) error {
|
||||
filters := query.ListFilters{}
|
||||
|
||||
queries, err := s.svc.Query.List(ctx.Request().Context(), filters)
|
||||
queries, err := s.svc.Query.List(ctx.Request().Context())
|
||||
if err != nil {
|
||||
return echo.NewHTTPError(http.StatusNotFound, fmt.Sprintf("Unable to list query: %s", err))
|
||||
}
|
||||
@@ -53,7 +51,7 @@ func (s *Controllers) CreateQuery(ctx echo.Context) error {
|
||||
return echo.NewHTTPError(http.StatusBadRequest, "Invalid Query Type")
|
||||
}
|
||||
|
||||
id, err := s.svc.Query.Create(ctx.Request().Context(), &queryprocessor.Create{
|
||||
id, err := s.svc.Query.Create(ctx.Request().Context(), &resultprocessor.Create{
|
||||
Type: qt,
|
||||
RequiredQueryIDs: req.RequiredQueries,
|
||||
Config: req.Config,
|
||||
@@ -73,7 +71,7 @@ func (s *Controllers) UpdateQuery(ctx echo.Context, id types.UUID) error {
|
||||
return echo.NewHTTPError(http.StatusBadRequest, err)
|
||||
}
|
||||
|
||||
err := s.svc.Query.Update(ctx.Request().Context(), &queryprocessor.Update{
|
||||
err := s.svc.Query.Update(ctx.Request().Context(), &resultprocessor.Update{
|
||||
ActiveVersion: req.ActiveVersion,
|
||||
Config: req.Config,
|
||||
RequiredQueryIDs: req.RequiredQueries,
|
||||
|
||||
Reference in New Issue
Block a user