[chore] embed filesystem
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-11-28 22:01:49 -05:00
parent 756db7a493
commit a34906c266
7 changed files with 43 additions and 37 deletions

View File

@@ -2,6 +2,7 @@ package server
import (
"context"
"embed"
"net/http"
"os"
"path/filepath"
@@ -22,10 +23,10 @@ type Server struct {
httpServer *http.Server
}
func NewServer() *Server {
func NewServer(assets embed.FS) *Server {
c := config.Load()
db := database.NewMgr(c)
api := api.NewApi(db, c)
api := api.NewApi(db, c, assets)
// Create Paths
docDir := filepath.Join(c.DataPath, "documents")