diff --git a/src/docs/swagger.json b/src/docs/swagger.json index 88f3fb8..3a1ddae 100644 --- a/src/docs/swagger.json +++ b/src/docs/swagger.json @@ -679,7 +679,7 @@ } } }, - "/v1/reaction/{number}": { + "/v1/reactions/{number}": { "post": { "description": "React to a message.", "consumes": [ @@ -689,12 +689,12 @@ "application/json" ], "tags": [ - "Reaction" + "Reactions" ], "summary": "Send a reaction.", "parameters": [ { - "description": "Reaction", + "description": "Reactions", "name": "data", "in": "body", "required": true, @@ -727,12 +727,12 @@ "application/json" ], "tags": [ - "Reaction" + "Reactions" ], "summary": "Delete a reaction.", "parameters": [ { - "description": "Reaction", + "description": "Reactions", "name": "data", "in": "body", "required": true, @@ -1378,7 +1378,7 @@ }, { "description": "React to messages.", - "name": "Reaction" + "name": "Reactions" } ] } \ No newline at end of file diff --git a/src/docs/swagger.yaml b/src/docs/swagger.yaml index 4843583..474117d 100644 --- a/src/docs/swagger.yaml +++ b/src/docs/swagger.yaml @@ -629,13 +629,13 @@ paths: summary: Link device and generate QR code. tags: - Devices - /v1/reaction/{number}: + /v1/reactions/{number}: post: consumes: - application/json description: React to a message. parameters: - - description: Reaction + - description: Reactions in: body name: data required: true @@ -654,13 +654,13 @@ paths: $ref: '#/definitions/api.Error' summary: Send a reaction. tags: - - Reaction + - Reactions delete: consumes: - application/json description: Delete a reaction. parameters: - - description: Reaction + - description: Reactions in: body name: data required: true @@ -679,7 +679,7 @@ paths: $ref: '#/definitions/api.Error' summary: Delete a reaction. tags: - - Reaction + - Reactions /v1/receive/{number}: get: consumes: @@ -904,5 +904,5 @@ tags: - description: List and Trust Identities. name: Identities - description: React to messages. - name: Reaction + name: Reactions " \ No newline at end of file diff --git a/src/main.go b/src/main.go index 3c27477..7dd9bbf 100644 --- a/src/main.go +++ b/src/main.go @@ -46,7 +46,7 @@ import ( // @tag.name Identities // @tag.description List and Trust Identities. -// @tag.name Reaction +// @tag.name Reactions // @tag.description React to messages. // @host 127.0.0.1:8080 @@ -199,10 +199,10 @@ func main() { typingIndicator.DELETE(":number", api.SendStopTyping) } - reaction := v1.Group("/reaction") + reactions := v1.Group("/reactions") { - reaction.POST(":number", api.SendReaction) - reaction.DELETE(":number", api.RemoveReaction) + reactions.POST(":number", api.SendReaction) + reactions.DELETE(":number", api.RemoveReaction) } }