fix: add template in "site-add" cause nginx error #796

This commit is contained in:
Jacky 2025-01-08 22:46:30 +08:00
parent b9822be86d
commit a9520c1169
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D
4 changed files with 26 additions and 26 deletions

View file

@ -3,7 +3,7 @@ package template
import "github.com/gin-gonic/gin"
func InitRouter(r *gin.RouterGroup) {
r.GET("templates", GetTemplate)
r.GET("default_site_template", GetDefaultSiteTemplate)
r.GET("templates/configs", GetTemplateConfList)
r.GET("templates/blocks", GetTemplateBlockList)
r.GET("templates/block/:name", GetTemplateBlock)

View file

@ -8,7 +8,7 @@ import (
"net/http"
)
func GetTemplate(c *gin.Context) {
func GetDefaultSiteTemplate(c *gin.Context) {
var ngxConfig *nginx.NgxConfig
ngxConfig = &nginx.NgxConfig{