summaryrefslogtreecommitdiff
path: root/internal/server/handler/handler.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2024-08-12 10:45:04 +0300
committerPaul Buetow <paul@buetow.org>2024-08-12 10:45:04 +0300
commit2fb3cfbe72170fb44a5056271f051806af09cc09 (patch)
tree926b240222be3451fae73ac90afd8f441612be3a /internal/server/handler/handler.go
parentb79de37224b40374cd0bc17881b3677138c44935 (diff)
rename
Diffstat (limited to 'internal/server/handler/handler.go')
-rw-r--r--internal/server/handler/handler.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/server/handler/handler.go b/internal/server/handler/handler.go
index 25a4d12..46bf73e 100644
--- a/internal/server/handler/handler.go
+++ b/internal/server/handler/handler.go
@@ -67,11 +67,12 @@ func (h Handler) Get(w http.ResponseWriter, r *http.Request) error {
return fmt.Errorf("no entry with id %s found", id)
}
- jsonBytes, err := ent.Serialize()
+ bytes, err := ent.JSONBytes()
if err != nil {
return err
}
- fmt.Fprint(w, string(jsonBytes))
+
+ fmt.Fprint(w, string(bytes))
return nil
}