summaryrefslogtreecommitdiffhomepage
path: root/src/http.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/http.go')
-rw-r--r--src/http.go13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/http.go b/src/http.go
index 04c17de..eaaeb71 100644
--- a/src/http.go
+++ b/src/http.go
@@ -8,8 +8,6 @@ import (
"log"
"math"
"net/http"
- "os"
- "path/filepath"
"slices"
"strconv"
"strings"
@@ -139,15 +137,8 @@ func mintageHandler(next http.Handler) http.Handler {
td.Type = "circ"
}
- path := filepath.Join("data", "mintages", td.Code)
- f, err := os.Open(path)
- if err != nil {
- throwError(http.StatusInternalServerError, err, w, r)
- return
- }
- defer f.Close()
-
- td.Mintages, err = mintage.Parse(f, path)
+ var err error
+ td.Mintages, err = mintage.Parse(td.Code)
if err != nil {
throwError(http.StatusInternalServerError, err, w, r)
return