🗑️ Totally removed frontend

This commit is contained in:
2024-08-12 21:16:48 +08:00
parent fe5e9c66b9
commit a97615b6c7
2 changed files with 3 additions and 23 deletions

View File

@ -1,18 +1,14 @@
package server
import (
"net/http"
"path/filepath"
"strings"
"git.solsynth.dev/hydrogen/passport/pkg/internal/server/admin"
"git.solsynth.dev/hydrogen/passport/pkg/internal/server/api"
"git.solsynth.dev/hydrogen/passport/pkg/internal/server/exts"
"github.com/gofiber/fiber/v2/middleware/filesystem"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/cors"
"github.com/gofiber/fiber/v2/middleware/favicon"
"github.com/gofiber/fiber/v2/middleware/idempotency"
"github.com/gofiber/fiber/v2/middleware/logger"
jsoniter "github.com/json-iterator/go"
@ -63,18 +59,6 @@ func NewServer() *HTTPApp {
admin.MapAdminAPIs(app, "/api/admin")
api.MapAPIs(app, "/api")
app.Use(filesystem.New(filesystem.Config{
Root: http.Dir(viper.GetString("frontend_app")),
Index: "index.html",
NotFoundFile: "index.html",
MaxAge: 3600,
}))
app.Use(favicon.New(favicon.Config{
File: filepath.Join(viper.GetString("frontend_app"), "favicon.png"),
URL: "/favicon.png",
}))
return &HTTPApp{app}
}