diff options
author | Thomas Voss <mail@thomasvoss.com> | 2025-06-06 01:32:41 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2025-06-06 01:32:41 +0200 |
commit | 2c726e551d90d20bcd2d78545c369864cc9038e5 (patch) | |
tree | 520615a33c966c729e70e549e859a2c01dc4ba40 /src/http.go | |
parent | 9379ea42a9b0afd1abf705bf3300f03d8bbe79f9 (diff) |
Use CSV’s for mintages
Diffstat (limited to 'src/http.go')
-rw-r--r-- | src/http.go | 13 |
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 |