remove schema from dockerfile and code, dependencies upgrade

This commit is contained in:
yusing
2025-01-30 00:43:25 +08:00
parent dfc634a362
commit b6e468e54e
5 changed files with 6 additions and 33 deletions

View File

@@ -1,23 +0,0 @@
package v1
import (
"net/http"
"os"
"path"
U "github.com/yusing/go-proxy/internal/api/v1/utils"
"github.com/yusing/go-proxy/internal/common"
)
func GetSchemaFile(w http.ResponseWriter, r *http.Request) {
filename := r.PathValue("filename")
if filename == "" {
U.RespondError(w, U.ErrMissingKey("filename"), http.StatusBadRequest)
}
content, err := os.ReadFile(path.Join(common.SchemasBasePath, filename))
if err != nil {
U.HandleErr(w, r, err)
return
}
U.WriteBody(w, content)
}