neko/internal/api/member/handler.go

32 lines
454 B
Go
Raw Normal View History

2020-10-31 06:16:21 +13:00
package member
import (
"github.com/go-chi/chi"
2020-11-01 00:27:55 +13:00
"demodesk/neko/internal/api/utils"
2020-10-31 06:16:21 +13:00
"demodesk/neko/internal/types"
)
type MemberHandler struct {
2020-11-02 04:54:06 +13:00
sessions types.SessionManager
2020-10-31 06:16:21 +13:00
}
func New(
sessions types.SessionManager,
) *MemberHandler {
// Init
return &MemberHandler{
2020-11-02 04:54:06 +13:00
sessions: sessions,
2020-10-31 06:16:21 +13:00
}
}
2020-10-31 22:48:24 +13:00
func (h *MemberHandler) Router(
2020-11-01 00:27:55 +13:00
usersOnly utils.HttpMiddleware,
adminsOnly utils.HttpMiddleware,
2020-10-31 22:48:24 +13:00
) *chi.Mux {
2020-10-31 06:16:21 +13:00
r := chi.NewRouter()
return r
}