logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: 8e040e098b1176098123e52608a9a73adec2b5e5
parent cb76faece99c706685b71ad5a13943036b481645
Author: marcin mikołajczak <git@mkljczk.pl>
Date:   Sun, 21 Nov 2021 18:17:06 +0100

Lint

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>

Diffstat:

Mlib/pleroma/web/api_spec/operations/account_operation.ex2+-
Mlib/pleroma/web/mastodon_api/controllers/account_controller.ex5++++-
Mpriv/repo/migrations/20211121000000_create_user_notes.exs4+---
3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/lib/pleroma/web/api_spec/operations/account_operation.ex b/lib/pleroma/web/api_spec/operations/account_operation.ex @@ -794,7 +794,7 @@ defmodule Pleroma.Web.ApiSpec.AccountOperation do properties: %{ comment: %Schema{ type: :string, - description: "Account note body", + description: "Account note body" } }, example: %{ diff --git a/lib/pleroma/web/mastodon_api/controllers/account_controller.ex b/lib/pleroma/web/mastodon_api/controllers/account_controller.ex @@ -441,7 +441,10 @@ defmodule Pleroma.Web.MastodonAPI.AccountController do end @doc "POST /api/v1/accounts/:id/note" - def note(%{assigns: %{user: noter, account: target}, body_params: %{comment: comment}} = conn, _params) do + def note( + %{assigns: %{user: noter, account: target}, body_params: %{comment: comment}} = conn, + _params + ) do with {:ok, _user_note} <- UserNote.create(noter, target, comment) do render(conn, "relationship.json", user: noter, target: target) else diff --git a/priv/repo/migrations/20211121000000_create_user_notes.exs b/priv/repo/migrations/20211121000000_create_user_notes.exs @@ -10,8 +10,6 @@ defmodule Pleroma.Repo.Migrations.CreateUserNotes do timestamps() end - create_if_not_exists( - unique_index(:user_notes, [:source_id, :target_id]) - ) + create_if_not_exists(unique_index(:user_notes, [:source_id, :target_id])) end end