summaryrefslogtreecommitdiffstats
path: root/main.go
diff options
context:
space:
mode:
authors-ol <s+removethis@s-ol.nu>2022-10-03 19:27:21 +0000
committers-ol <s+removethis@s-ol.nu>2022-10-03 19:42:33 +0000
commit5d5bfa7bb25e1a42fb74ddfb95b9c86ee440bb9c (patch)
treea2398faaed0b8bc87487b7fffa27aa15a64a5c55 /main.go
parentfix CORS etc (diff)
downloadjson-hopper-main.tar.gz
json-hopper-main.zip
add newline to end of JSON filesmain
Diffstat (limited to 'main.go')
-rw-r--r--main.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.go b/main.go
index 7e815fb..f846717 100644
--- a/main.go
+++ b/main.go
@@ -188,8 +188,8 @@ func (h *SiteHandler) handlePOST(w http.ResponseWriter, r *http.Request, meta ma
id, key := meta["id"].(string), meta["key"].(string)
if err := os.WriteFile(
- filepath.Join(h.path, id+".json"),
- raw_data,
+ filepath.Join(h.path, id + ".json"),
+ append(raw_data, '\n'),
0644,
); err != nil {
return err