2023-09-04 11:13:21 +02:00
|
|
|
/**
|
|
|
|
|
* Created by VoidArtanis on 10/22/2017
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
package routes
|
|
|
|
|
|
|
|
|
|
import (
|
2023-09-11 08:08:24 +02:00
|
|
|
"gitlab.com/pactual1/backend/middlewares"
|
2023-09-11 08:08:24 +02:00
|
|
|
|
2023-09-11 08:08:24 +02:00
|
|
|
"gitlab.com/pactual1/backend/controllers"
|
2023-09-11 08:08:24 +02:00
|
|
|
|
2023-09-04 11:13:21 +02:00
|
|
|
"github.com/gin-gonic/gin"
|
|
|
|
|
)
|
|
|
|
|
|
2023-09-18 12:27:40 +02:00
|
|
|
func RegisterProtectedRoutes(r *gin.Engine) {
|
2023-09-04 11:13:21 +02:00
|
|
|
|
|
|
|
|
authGroup := r.Group("/auth")
|
|
|
|
|
|
|
|
|
|
authGroup.Use(middlewares.AuthHandler("admin"))
|
|
|
|
|
{
|
2023-09-21 11:59:08 +02:00
|
|
|
authGroup.GET("/getmessage", controllers.GetSecretText)
|
2023-09-04 11:13:21 +02:00
|
|
|
}
|
|
|
|
|
}
|