mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 02:15:48 +02:00
21 lines
446 B
Go
21 lines
446 B
Go
package config
|
|
|
|
import (
|
|
"github.com/0xJacky/Nginx-UI/internal/middleware"
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
func InitRouter(r *gin.RouterGroup) {
|
|
r.GET("config_base_path", GetBasePath)
|
|
|
|
r.GET("configs", GetConfigs)
|
|
r.GET("configs/*name", GetConfig)
|
|
r.POST("configs", AddConfig)
|
|
r.POST("configs/*name", EditConfig)
|
|
|
|
o := r.Group("", middleware.RequireSecureSession())
|
|
{
|
|
o.POST("config_mkdir", Mkdir)
|
|
o.POST("config_rename", Rename)
|
|
}
|
|
}
|