mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-03 01:41:44 +00:00
refactor: rename internal/session package to internal/ctx
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
package session
|
||||
package ctx
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
@@ -1,10 +1,8 @@
|
||||
package session
|
||||
package ctx
|
||||
|
||||
import (
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/segmentio/ksuid"
|
||||
|
||||
"github.com/onsonr/sonr/internal/headers"
|
||||
)
|
||||
|
||||
// GetSession returns the current Session
|
||||
@@ -16,7 +14,7 @@ func GetSession(c echo.Context) *Session {
|
||||
func UseSession(next echo.HandlerFunc) echo.HandlerFunc {
|
||||
return func(c echo.Context) error {
|
||||
sc := initSession(c)
|
||||
headers := new(headers.RequestHeaders)
|
||||
headers := new(RequestHeaders)
|
||||
err := sc.Bind(headers)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -1,4 +1,4 @@
|
||||
package headers
|
||||
package ctx
|
||||
|
||||
type RequestHeaders struct {
|
||||
CacheControl *string `header:"Cache-Control"`
|
||||
@@ -1,4 +1,4 @@
|
||||
package headers
|
||||
package ctx
|
||||
|
||||
type ResponseHeaders struct {
|
||||
// HTMX Specific
|
||||
Reference in New Issue
Block a user