ChatController: Add mark_as_read

This commit is contained in:
lain 2020-05-04 13:10:36 +02:00
commit b04328c3de
5 changed files with 62 additions and 1 deletions

View file

@ -16,6 +16,28 @@ defmodule Pleroma.Web.ApiSpec.ChatOperation do
apply(__MODULE__, operation, [])
end
def mark_as_read_operation do
%Operation{
tags: ["chat"],
summary: "Mark all messages in the chat as read",
operationId: "ChatController.mark_as_read",
parameters: [Operation.parameter(:id, :path, :string, "The ID of the Chat")],
responses: %{
200 =>
Operation.response(
"The updated chat",
"application/json",
Chat
)
},
security: [
%{
"oAuth" => ["write"]
}
]
}
end
def create_operation do
%Operation{
tags: ["chat"],