From 7abfd965dbf881ea64c65c38c6148d6390e48997 Mon Sep 17 00:00:00 2001 From: Laura Date: Sat, 30 Aug 2025 14:15:22 +0200 Subject: [PATCH] fix title schema --- title.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/title.go b/title.go index 3ce5b2e..6e41ebd 100644 --- a/title.go +++ b/title.go @@ -16,8 +16,7 @@ type TitleRequest struct { } type TitleResponse struct { - Title string `json:"title"` - Cost float64 `json:"cost,omitempty"` + Title string `json:"title"` } var ( @@ -146,7 +145,8 @@ func HandleTitle(w http.ResponseWriter, r *http.Request) { return } - result.Cost = cost - - RespondJson(w, http.StatusOK, result) + RespondJson(w, http.StatusOK, map[string]any{ + "title": result.Title, + "cost": cost, + }) }