diff --git a/server/internal/service/notes.go b/server/internal/service/notes.go index 54add84..a3e05cb 100644 --- a/server/internal/service/notes.go +++ b/server/internal/service/notes.go @@ -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