def note_operation do
%Operation{
tags: ["Account actions"],
- summary: "Create note",
+ summary: "Set a private note about a user.",
operationId: "AccountController.note",
security: [%{"oAuth" => ["follow", "write:accounts"]}],
requestBody: request_body("Parameters", note_request()),
) do
with {:ok, _user_note} <- UserNote.create(noter, target, comment) do
render(conn, "relationship.json", user: noter, target: target)
- else
- {:error, message} -> json_response(conn, :forbidden, %{error: message})
end
end