feat: 前端搭建-未完成

This commit is contained in:
tbphp
2025-06-29 21:59:32 +08:00
parent ab95af0bbe
commit 731315144e
62 changed files with 4831 additions and 604 deletions

View File

@@ -0,0 +1,26 @@
package handler
import (
"gpt-load/internal/response"
"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"
)
// ReloadConfig handles the POST /api/reload request.
// It triggers a configuration reload.
func (s *Server) ReloadConfig(c *gin.Context) {
if s.config == nil {
response.InternalError(c, "Configuration manager is not initialized")
return
}
err := s.config.ReloadConfig()
if err != nil {
logrus.Errorf("Failed to reload config: %v", err)
response.InternalError(c, "Failed to reload config")
return
}
response.Success(c, gin.H{"message": "Configuration reloaded successfully"})
}