add routers themes
This commit is contained in:
@@ -1,4 +1,11 @@
|
||||
// 示例:插件接口
|
||||
package utils // 示例:插件接口
|
||||
import (
|
||||
"go_blog/models"
|
||||
"strings"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
type Plugin interface {
|
||||
OnArticleCreate(article *models.Article) // 文章创建钩子
|
||||
RegisterRoutes(r *gin.Engine) // 添加新路由
|
||||
@@ -11,4 +18,4 @@ func handleThemeUpload(c *gin.Context) {
|
||||
c.AbortWithStatus(400)
|
||||
}
|
||||
// 解压到临时目录并校验文件结构
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user