neko/internal/api/member/handler.go
2020-10-31 12:27:55 +01:00

35 lines
553 B
Go

package member
import (
"github.com/go-chi/chi"
"demodesk/neko/internal/api/utils"
"demodesk/neko/internal/types"
)
type MemberHandler struct {
sessions types.SessionManager
websocket types.WebSocketHandler
}
func New(
sessions types.SessionManager,
websocket types.WebSocketHandler,
) *MemberHandler {
// Init
return &MemberHandler{
sessions: sessions,
websocket: websocket,
}
}
func (h *MemberHandler) Router(
usersOnly utils.HttpMiddleware,
adminsOnly utils.HttpMiddleware,
) *chi.Mux {
r := chi.NewRouter()
return r
}