feat: register draft API endpoints

This commit is contained in:
csr4422
2025-12-16 13:45:35 +05:30
parent 2db50b7978
commit 459bcaecf6
+4
View File
@@ -66,6 +66,10 @@ func initHandlers(g *fastglue.Fastglue, hub *ws.Hub) {
g.POST("/api/v1/conversations", perm(handleCreateConversation, "conversations:write"))
g.PUT("/api/v1/conversations/{uuid}/custom-attributes", auth(handleUpdateConversationCustomAttributes))
g.PUT("/api/v1/conversations/{uuid}/contacts/custom-attributes", auth(handleUpdateContactCustomAttributes))
// Draft endpoints
g.POST("/api/v1/conversations/{uuid}/draft", auth(handleUpsertConversationDraft))
g.GET("/api/v1/conversations/{uuid}/draft", auth(handleGetConversationDraft))
g.DELETE("/api/v1/conversations/{uuid}/draft", auth(handleDeleteConversationDraft))
// Search.
g.GET("/api/v1/conversations/search", perm(handleSearchConversations, "conversations:read"))