1
0
mirror of https://github.com/coalaura/whiskr.git synced 2025-09-08 17:06:42 +00:00

fix title schema

This commit is contained in:
Laura
2025-08-30 14:15:22 +02:00
parent fc0a34ee12
commit 7abfd965db

View File

@@ -16,8 +16,7 @@ type TitleRequest struct {
} }
type TitleResponse struct { type TitleResponse struct {
Title string `json:"title"` Title string `json:"title"`
Cost float64 `json:"cost,omitempty"`
} }
var ( var (
@@ -146,7 +145,8 @@ func HandleTitle(w http.ResponseWriter, r *http.Request) {
return return
} }
result.Cost = cost RespondJson(w, http.StatusOK, map[string]any{
"title": result.Title,
RespondJson(w, http.StatusOK, result) "cost": cost,
})
} }