Skip to content

Commit

Permalink
Remove fatal
Browse files Browse the repository at this point in the history
  • Loading branch information
Akkadius committed Dec 31, 2021
1 parent 46ff8b1 commit e2637d1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions internal/http/controllers/quest_file_api_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"github.com/labstack/echo/v4"
"github.com/sirupsen/logrus"
"io/ioutil"
"log"
"net/http"
"net/url"
"os"
Expand Down Expand Up @@ -34,10 +33,10 @@ func (h *QuestFileApiController) Routes() []*routes.Route {
func visit(files *[]string) filepath.WalkFunc {
return func(path string, info os.FileInfo, err error) error {
if err != nil {
log.Fatal(err)
panic(err)
}

if strings.Contains(path, ".git") || strings.Contains(path, "./quests"){
if strings.Contains(path, ".git") || strings.Contains(path, "./quests") {
return nil
}

Expand All @@ -63,7 +62,6 @@ func (h *QuestFileApiController) listFiles(c echo.Context) error {
return c.JSON(http.StatusOK, echo.Map{"files": files})
}


func (h *QuestFileApiController) getFile(c echo.Context) error {
path, err := url.QueryUnescape(c.Param("file"))
if err != nil {
Expand Down

0 comments on commit e2637d1

Please sign in to comment.