restore CONTENTS_DIR
This commit is contained in:
@@ -75,7 +75,7 @@
|
||||
- `parseMeta()` - Metadatok feldolgozása (de `FileRepository.ReadMetaFromFile()` segítségével)
|
||||
|
||||
#### ✅ 3.2 Environment Variables - Centralizált konfiguráció
|
||||
- `GAMES_DIR` és `CONTENTS_DIR` továbbra is `os.Getenv()`-el hívódnak
|
||||
- `GAMES_DIR` és `GAMES_DIR` továbbra is `os.Getenv()`-el hívódnak
|
||||
- MEGLÉPÉS: Az env vars a Domain inicializációban továbbra is szétszórva vannak
|
||||
- TODO: Config struct még nem készült (de nem kritikus)
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
```
|
||||
|
||||
#### ✅ 3.6 Erőforrás nevek megtisztítása
|
||||
- `GAMES_DIR` → `CONTENTS_DIR` (nem "game" szó)
|
||||
- `GAMES_DIR` → `GAMES_DIR` (nem "game" szó)
|
||||
- Összes referencia frissítve
|
||||
|
||||
---
|
||||
|
||||
@@ -29,7 +29,7 @@ func NewSoftwareUpdaterTIC80Service(
|
||||
|
||||
func (s *SoftwareUpdaterTIC80Service) Update(name string) error {
|
||||
fmt.Printf("TIC80 Updater: Starting update for name: %s\n", name)
|
||||
contentsPath, _ := os.LookupEnv("CONTENTS_DIR")
|
||||
contentsPath, _ := os.LookupEnv("GAMES_DIR")
|
||||
|
||||
// Case 1: HTML content (name.html.zip)
|
||||
if err := s.handleHTMLContent(name, contentsPath); err == nil {
|
||||
|
||||
@@ -33,7 +33,7 @@ func (c *DownloadController) serve(w http.ResponseWriter, r *http.Request, relea
|
||||
return
|
||||
}
|
||||
|
||||
absContentsDir, err := filepath.Abs(os.Getenv("CONTENTS_DIR"))
|
||||
absContentsDir, err := filepath.Abs(os.Getenv("GAMES_DIR"))
|
||||
if err != nil {
|
||||
http.Error(w, "Invalid contents directory path", http.StatusInternalServerError)
|
||||
return
|
||||
|
||||
@@ -40,7 +40,7 @@ func (c *PlayController) Play(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
func (c *PlayController) ServeContent(w http.ResponseWriter, r *http.Request) {
|
||||
contentsPath := os.Getenv("CONTENTS_DIR")
|
||||
contentsPath := os.Getenv("GAMES_DIR")
|
||||
name := chi.URLParam(r, "name")
|
||||
if name == "" {
|
||||
http.Error(w, "Name not provided", http.StatusBadRequest)
|
||||
|
||||
Reference in New Issue
Block a user