mirror of
https://github.com/snowykami/neo-blog.git
synced 2025-09-26 19:16:24 +00:00
Refactor site configuration and color scheme management
- Replaced static config with dynamic site info context. - Updated color scheme handling in various components to use site info. - Removed deprecated config file and integrated site info fetching. - Enhanced user preference page to allow color scheme selection. - Adjusted blog and console components to reflect new site info structure. - Improved error handling and fallback mechanisms for site info retrieval.
This commit is contained in:
@ -1 +1,18 @@
|
||||
package apiv1
|
||||
|
||||
import (
|
||||
"github.com/cloudwego/hertz/pkg/route"
|
||||
v1 "github.com/snowykami/neo-blog/internal/controller/v1"
|
||||
"github.com/snowykami/neo-blog/internal/middleware"
|
||||
"github.com/snowykami/neo-blog/pkg/constant"
|
||||
)
|
||||
|
||||
func registerMiscRoutes(group *route.RouterGroup) {
|
||||
miscController := v1.NewMiscController()
|
||||
miscGroupAdmin := group.Group("/misc").Use(middleware.UseAuth(true)).Use(middleware.UseRole(constant.RoleAdmin))
|
||||
miscGroupWithoutAuth := group.Group("/misc").Use(middleware.UseAuth(false))
|
||||
{
|
||||
miscGroupWithoutAuth.GET("/site-info", miscController.GetSiteInfo)
|
||||
miscGroupAdmin.PUT("/site-info", miscController.SetSiteInfo)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user