restore CONTENTS_DIR
This commit is contained in:
@@ -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