1
0
mirror of https://github.com/coalaura/whiskr.git synced 2025-09-08 00:29:54 +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 {
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,
})
}