mirror of https://github.com/JustKato/FreePad.git
20 lines
266 B
Go
20 lines
266 B
Go
|
package controllers
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
|
||
|
"github.com/gin-gonic/gin"
|
||
|
)
|
||
|
|
||
|
func AdminMiddleware(router *gin.RouterGroup) {
|
||
|
|
||
|
// Handl
|
||
|
router.Use(func(ctx *gin.Context) {
|
||
|
|
||
|
// Check which route we are accessing
|
||
|
fmt.Println(`Accesing: `, ctx.Request.RequestURI)
|
||
|
|
||
|
})
|
||
|
|
||
|
}
|