diff --git a/ginext/funcWrapper.go b/ginext/funcWrapper.go index 86af44e..4aaa2f9 100644 --- a/ginext/funcWrapper.go +++ b/ginext/funcWrapper.go @@ -39,7 +39,7 @@ func Wrap(w *GinWrapper, fn WHandlerFunc) gin.HandlerFunc { } if pctx.persistantData.sessionObj != nil { - err := pctx.persistantData.sessionObj.Finish(reqctx, wrap) + err := (*pctx.persistantData.sessionObj).Finish(reqctx, wrap) if err != nil { wrap = Error(exerr.Wrap(err, "Failed to finish session").Any("originalResponse", wrap).Build()) } diff --git a/ginext/preContext.go b/ginext/preContext.go index a02da80..4731b8a 100644 --- a/ginext/preContext.go +++ b/ginext/preContext.go @@ -28,7 +28,7 @@ type PreContext struct { } type preContextData struct { - sessionObj SessionObject + sessionObj *SessionObject } func (pctx *PreContext) URI(uri any) *PreContext { @@ -67,7 +67,7 @@ func (pctx *PreContext) WithTimeout(to time.Duration) *PreContext { } func (pctx *PreContext) WithSession(sessionObj SessionObject) *PreContext { - pctx.persistantData.sessionObj = sessionObj + pctx.persistantData.sessionObj = &sessionObj return pctx } @@ -164,7 +164,7 @@ func (pctx PreContext) Start() (*AppContext, *gin.Context, *HTTPResponse) { ictx, cancel := context.WithTimeout(context.Background(), langext.Coalesce(pctx.timeout, pctx.wrapper.requestTimeout)) if pctx.persistantData.sessionObj != nil { - err := pctx.persistantData.sessionObj.Init(pctx.ginCtx, ictx) + err := (*pctx.persistantData.sessionObj).Init(pctx.ginCtx, ictx) if err != nil { cancel() return nil, nil, langext.Ptr(Error(exerr.Wrap(err, "Failed to init session").Build())) diff --git a/goextVersion.go b/goextVersion.go index 30621a2..1b998a6 100644 --- a/goextVersion.go +++ b/goextVersion.go @@ -1,5 +1,5 @@ package goext -const GoextVersion = "0.0.327" +const GoextVersion = "0.0.328" -const GoextVersionTimestamp = "2023-12-02T13:15:19+0100" +const GoextVersionTimestamp = "2023-12-02T13:35:18+0100"