mirror of
https://github.com/JustKato/FreePad.git
synced 2026-02-23 15:50:46 +02:00
Working on the admin interface
+ Implemented login token + Routing + Admin controller + Login Page * Updated `.env` example
This commit is contained in:
19
lib/controllers/controllers_admin.go
Normal file
19
lib/controllers/controllers_admin.go
Normal file
@@ -0,0 +1,19 @@
|
||||
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)
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user