From 9b7ecd65f0eb9cca72021fe2bbb2eb79a7235574 Mon Sep 17 00:00:00 2001 From: Abhinav Raut Date: Mon, 3 Feb 2025 23:37:09 +0530 Subject: [PATCH] rename handler --- cmd/conversation.go | 4 ++-- cmd/handlers.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/conversation.go b/cmd/conversation.go index d75b00e3..8ea933cf 100644 --- a/cmd/conversation.go +++ b/cmd/conversation.go @@ -331,8 +331,8 @@ func handleGetConversationParticipants(r *fastglue.Request) error { return r.SendEnvelope(p) } -// handleUpdateConversationUserAssignee updates the user assigned to a conversation. -func handleUpdateConversationUserAssignee(r *fastglue.Request) error { +// handleUpdateUserAssignee updates the user assigned to a conversation. +func handleUpdateUserAssignee(r *fastglue.Request) error { var ( app = r.Context.(*App) uuid = r.RequestCtx.UserValue("uuid").(string) diff --git a/cmd/handlers.go b/cmd/handlers.go index 779c04fd..6581d652 100644 --- a/cmd/handlers.go +++ b/cmd/handlers.go @@ -50,7 +50,7 @@ func initHandlers(g *fastglue.Fastglue, hub *ws.Hub) { g.GET("/api/v1/views/{id}/conversations", perm(handleGetViewConversations, "conversations:read")) g.GET("/api/v1/conversations/{uuid}", perm(handleGetConversation, "conversations:read")) g.GET("/api/v1/conversations/{uuid}/participants", perm(handleGetConversationParticipants, "conversations:read")) - g.PUT("/api/v1/conversations/{uuid}/assignee/user", perm(handleUpdateConversationUserAssignee, "conversations:update_user_assignee")) + g.PUT("/api/v1/conversations/{uuid}/assignee/user", perm(handleUpdateUserAssignee, "conversations:update_user_assignee")) g.PUT("/api/v1/conversations/{uuid}/assignee/team", perm(handleUpdateTeamAssignee, "conversations:update_team_assignee")) g.PUT("/api/v1/conversations/{uuid}/assignee/user/remove", perm(handleRemoveUserAssignee, "conversations:update_user_assignee")) g.PUT("/api/v1/conversations/{uuid}/assignee/team/remove", perm(handleRemoveTeamAssignee, "conversations:update_team_assignee"))