Could it be?

This commit is contained in:
phoenix
2026-01-01 14:28:55 -05:00
parent 400490b633
commit a0bab48f40
2 changed files with 8 additions and 8 deletions
-5
View File
@@ -46,11 +46,6 @@ type AddMessageResponse struct {
// @Failure 500 {object} AddMessageResponse
// @Router /message/new [post]
func (m *MessageHandler) AddMessage(w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodPost {
http.Error(w, "Method not allowed", http.StatusMethodNotAllowed)
return
}
var req RequestAddMessage
if err := ExtractFromRequest(r, &req); err != nil {
http.Error(w, "Invalid JSON: "+err.Error(), http.StatusBadRequest)