Apply 2 suggestion(s) to 2 file(s)
This commit is contained in:
parent
8e040e098b
commit
588bcbac55
2 changed files with 1 additions and 3 deletions
|
@ -331,7 +331,7 @@ def unblock_operation do
|
||||||
def note_operation do
|
def note_operation do
|
||||||
%Operation{
|
%Operation{
|
||||||
tags: ["Account actions"],
|
tags: ["Account actions"],
|
||||||
summary: "Create note",
|
summary: "Set a private note about a user.",
|
||||||
operationId: "AccountController.note",
|
operationId: "AccountController.note",
|
||||||
security: [%{"oAuth" => ["follow", "write:accounts"]}],
|
security: [%{"oAuth" => ["follow", "write:accounts"]}],
|
||||||
requestBody: request_body("Parameters", note_request()),
|
requestBody: request_body("Parameters", note_request()),
|
||||||
|
|
|
@ -447,8 +447,6 @@ def note(
|
||||||
) do
|
) do
|
||||||
with {:ok, _user_note} <- UserNote.create(noter, target, comment) do
|
with {:ok, _user_note} <- UserNote.create(noter, target, comment) do
|
||||||
render(conn, "relationship.json", user: noter, target: target)
|
render(conn, "relationship.json", user: noter, target: target)
|
||||||
else
|
|
||||||
{:error, message} -> json_response(conn, :forbidden, %{error: message})
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue