ci(backend): 调整 embed server

This commit is contained in:
Forest
2025-12-20 16:44:25 +08:00
parent 1e1f3c0c74
commit aa89777dda
5 changed files with 46 additions and 13 deletions

View File

@@ -0,0 +1,20 @@
//go:build !embed
package web
import (
"net/http"
"github.com/gin-gonic/gin"
)
func ServeEmbeddedFrontend() gin.HandlerFunc {
return func(c *gin.Context) {
c.String(http.StatusNotFound, "Frontend not embedded. Build with -tags embed to include frontend.")
c.Abort()
}
}
func HasEmbeddedFrontend() bool {
return false
}