feat: remove unnecessary DTO type

This commit is contained in:
ae 2025-04-09 17:44:35 +03:00
parent e7ba54a992
commit 47fa47bdc7
Signed by: ae
GPG Key ID: 995EFD5C1B532B3E

View File

@ -118,17 +118,10 @@ func (rs *notesResource) Create(w http.ResponseWriter, r *http.Request) {
// Placeholder contents are decided server-side, so we need to inform the client of them via a
// one-time-use DTO
type response struct {
Title string `json:"title"`
Content string `json:"content"`
}
res := response{
Title: initVersionTitle,
Content: initVersionContent,
}
respondJSON(w, http.StatusCreated, res)
respondJSON(w, http.StatusCreated, map[string]string{
"title": initVersionTitle,
"content": initVersionContent,
})
}
// Handler for listing the metadata of all user's available notes. This metadata contains IDs of