fix: v1 event push on REST API, namespace (#1575)

* fix: v1 event push on REST API, namespace

* fix(go-sdk): duration timeouts should be cast to seconds
This commit is contained in:
abelanger5
2025-04-18 13:22:00 -04:00
committed by GitHub
parent 4e42beecc6
commit 7e1b43bf4a
3 changed files with 28 additions and 16 deletions

View File

@@ -10,7 +10,6 @@ import (
"github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers"
"github.com/hatchet-dev/hatchet/pkg/repository/metered"
"github.com/hatchet-dev/hatchet/pkg/repository/postgres/dbsqlc"
"github.com/hatchet-dev/hatchet/pkg/repository/postgres/sqlchelpers"
)
func (t *EventService) EventCreate(ctx echo.Context, request gen.EventCreateRequestObject) (gen.EventCreateResponseObject, error) {
@@ -45,13 +44,7 @@ func (t *EventService) EventCreate(ctx echo.Context, request gen.EventCreateRequ
return nil, err
}
dbNewEvent, err := t.config.APIRepository.Event().GetEventById(ctx.Request().Context(), sqlchelpers.UUIDToStr(newEvent.ID))
if err != nil {
return nil, err
}
return gen.EventCreate200JSONResponse(
transformers.ToEvent(dbNewEvent),
transformers.ToEvent(newEvent),
), nil
}