mirror of
https://git.fightbot.fun/hxuanyu/BingPaper.git
synced 2026-02-15 07:19:33 +08:00
移除静态文件支持:删除静态资源目录相关代码和 Dockerfile 配置
This commit is contained in:
@@ -34,9 +34,6 @@ func SetupRouter(webFS embed.FS) *gin.Engine {
|
||||
// Swagger
|
||||
r.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))
|
||||
|
||||
// 静态文件
|
||||
r.Static("/static", "./static")
|
||||
|
||||
api := r.Group("/api/v1")
|
||||
{
|
||||
// 公共接口
|
||||
|
||||
@@ -242,9 +242,8 @@ func (f *Fetcher) saveVariant(ctx context.Context, img *model.Image, variant, fo
|
||||
func (f *Fetcher) saveDailyFiles(srcImg image.Image, originalData []byte) {
|
||||
util.Logger.Info("Saving daily files")
|
||||
localRoot := config.GetConfig().Storage.Local.Root
|
||||
if config.GetConfig().Storage.Type != "local" {
|
||||
// 如果不是本地存储,保存在静态资源目录
|
||||
localRoot = "static"
|
||||
if localRoot == "" {
|
||||
localRoot = "data"
|
||||
}
|
||||
|
||||
if err := os.MkdirAll(localRoot, 0755); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user