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 // Placeholder contents are decided server-side, so we need to inform the client of them via a
// one-time-use DTO // one-time-use DTO
type response struct { respondJSON(w, http.StatusCreated, map[string]string{
Title string `json:"title"` "title": initVersionTitle,
Content string `json:"content"` "content": initVersionContent,
} })
res := response{
Title: initVersionTitle,
Content: initVersionContent,
}
respondJSON(w, http.StatusCreated, res)
} }
// Handler for listing the metadata of all user's available notes. This metadata contains IDs of // Handler for listing the metadata of all user's available notes. This metadata contains IDs of