From a0ff9b7761f96b8cc32254b8b0b5b93da13839c9 Mon Sep 17 00:00:00 2001 From: Joan Manuel Jaramillo Avila <89425013+LifeRIP@users.noreply.github.com> Date: Tue, 10 Jun 2025 17:36:19 -0500 Subject: [PATCH] chore: Updates API endpoints for chat message retrieval Renames two API routes to improve clarity and consistency: - Changes `/chat/direct/{chatId}/messages` to `/chat/direct/{chatId}/messages/paginated` for clarity in pagination. - Changes `/chat/rooms/{roomId}/messages/simple` to `/chat/rooms/{roomId}/messages` for simplicity and alignment with route naming conventions. These changes enhance readability and better reflect the endpoints' purposes. --- internal/handlers/chat_handler.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/handlers/chat_handler.go b/internal/handlers/chat_handler.go index 4a8e754..c111ba5 100644 --- a/internal/handlers/chat_handler.go +++ b/internal/handlers/chat_handler.go @@ -247,7 +247,7 @@ func (h *ChatHandler) GetUserDirectChats(w http.ResponseWriter, r *http.Request) // @Failure 401 {string} string "No autorizado" // @Failure 404 {string} string "Chat no encontrado" // @Failure 500 {string} string "Error interno del servidor" -// @Router /chat/direct/{chatId}/messages [get] +// @Router /chat/direct/{chatId}/messages/paginated [get] func (h *ChatHandler) GetDirectChatMessages(w http.ResponseWriter, r *http.Request) { chatID := chi.URLParam(r, "chatId") @@ -354,7 +354,7 @@ func (h *ChatHandler) JoinRoom(w http.ResponseWriter, r *http.Request) { // @Failure 401 {string} string "No autorizado" // @Failure 404 {string} string "Sala no encontrada" // @Failure 500 {string} string "Error interno del servidor" -// @Router /chat/rooms/{roomId}/messages/simple [get] +// @Router /chat/rooms/{roomId}/messages [get] func (h *ChatHandler) GetRoomMessagesSimple(w http.ResponseWriter, r *http.Request) { roomID := chi.URLParam(r, "roomId")