fabric/restapi/sessions.go
2024-10-06 15:29:01 +02:00

19 lines
463 B
Go

package restapi
import (
"github.com/danielmiessler/fabric/db"
"github.com/labstack/echo/v4"
)
// SessionsHandler defines the handler for sessions-related operations
type SessionsHandler struct {
*StorageHandler[db.Session]
sessions *db.SessionsEntity
}
// NewSessionsHandler creates a new SessionsHandler
func NewSessionsHandler(e *echo.Echo, sessions *db.SessionsEntity) (ret *SessionsHandler) {
ret = &SessionsHandler{sessions: sessions}
return ret
}