25 lines
572 B
Go
25 lines
572 B
Go
package middleware
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"git.cialloo.com/CiallooWeb/Blog/app/internal/config"
|
|
)
|
|
|
|
type SuperAdminAuthMiddleware struct {
|
|
Config config.Config
|
|
}
|
|
|
|
func NewSuperAdminAuthMiddleware(c config.Config) *SuperAdminAuthMiddleware {
|
|
return &SuperAdminAuthMiddleware{Config: c}
|
|
}
|
|
|
|
func (m *SuperAdminAuthMiddleware) Handle(next http.HandlerFunc) http.HandlerFunc {
|
|
return func(w http.ResponseWriter, r *http.Request) {
|
|
// TODO generate middleware implement function, delete after code implementation
|
|
|
|
// Passthrough to next handler if need
|
|
next(w, r)
|
|
}
|
|
}
|