update
This commit is contained in:
24
app/internal/middleware/superadminauthmiddleware.go
Normal file
24
app/internal/middleware/superadminauthmiddleware.go
Normal file
@@ -0,0 +1,24 @@
|
||||
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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user