Lint
authormarcin mikołajczak <git@mkljczk.pl>
Sun, 21 Nov 2021 17:17:06 +0000 (18:17 +0100)
committermarcin mikołajczak <git@mkljczk.pl>
Sun, 21 Nov 2021 17:17:06 +0000 (18:17 +0100)
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
lib/pleroma/web/api_spec/operations/account_operation.ex
lib/pleroma/web/mastodon_api/controllers/account_controller.ex
priv/repo/migrations/20211121000000_create_user_notes.exs

index 6cedada2c84ca7d44a81d2a71f0c29b702df2ea0..4aca16e7226e53be2f9e1b59ef04098a2bf16356 100644 (file)
@@ -794,7 +794,7 @@ defmodule Pleroma.Web.ApiSpec.AccountOperation do
       properties: %{
         comment: %Schema{
           type: :string,
-          description: "Account note body",
+          description: "Account note body"
         }
       },
       example: %{
index 8a43d49d3380d51510d42f9065e428b07eb7c4eb..a2c4920c1e3942df97e7341969efcf7d454d7717 100644 (file)
@@ -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
index 8fc23749f7ac1a75db088056aa80c2fdc9be0d2a..b75e11695ccb1add21c2b4cb5ce7c669efb3d054 100644 (file)
@@ -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