diff --git a/config/description.exs b/config/description.exs index faeae93922..b1a36220bc 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1117,7 +1117,8 @@ %{ key: :order_by_published_at, type: :boolean, - description: "Order statuses in timelines basing on their declared publication date, instead of insertion date." + description: + "Order statuses in timelines basing on their declared publication date, instead of insertion date." } ] }, diff --git a/lib/pleroma/object.ex b/lib/pleroma/object.ex index e1c6000cbe..f0bb2b48c3 100644 --- a/lib/pleroma/object.ex +++ b/lib/pleroma/object.ex @@ -483,7 +483,7 @@ defp uniq_case_insensitive(strings) do end defp find_original_case(string, strings) do - Enum.find(strings, &String.downcase(&1) == string) + Enum.find(strings, &(String.downcase(&1) == string)) end def get_emoji_reactions(object) do diff --git a/lib/pleroma/web/api_spec/operations/admin/import_operation.ex b/lib/pleroma/web/api_spec/operations/admin/import_operation.ex index 3f020da6cc..8a9e3f7e7f 100644 --- a/lib/pleroma/web/api_spec/operations/admin/import_operation.ex +++ b/lib/pleroma/web/api_spec/operations/admin/import_operation.ex @@ -24,9 +24,7 @@ def collection_operation do operationId: "AdminAPI.ImportController.collection", parameters: [%Reference{"$ref": "#/components/parameters/accountIdOrNickname"}], requestBody: - request_body("Parameters", UserImportOperation.import_collection_request(), - required: true - ), + request_body("Parameters", UserImportOperation.import_collection_request(), required: true), responses: %{ 200 => ok_response(), 500 => Operation.response("Error", "application/json", ApiError) diff --git a/lib/pleroma/web/api_spec/operations/search_operation.ex b/lib/pleroma/web/api_spec/operations/search_operation.ex index 174c70f36d..d244fec6ac 100644 --- a/lib/pleroma/web/api_spec/operations/search_operation.ex +++ b/lib/pleroma/web/api_spec/operations/search_operation.ex @@ -79,9 +79,7 @@ def search_operation do %Schema{type: :string, enum: ["accounts", "hashtags", "statuses"]}, "Search type" ), - Operation.parameter(:q, :query, %Schema{type: :string}, "The search query", - required: true - ), + Operation.parameter(:q, :query, %Schema{type: :string}, "The search query", required: true), Operation.parameter( :resolve, :query, diff --git a/lib/pleroma/web/api_spec/operations/user_import_operation.ex b/lib/pleroma/web/api_spec/operations/user_import_operation.ex index db072e7128..1b00ed4d6a 100644 --- a/lib/pleroma/web/api_spec/operations/user_import_operation.ex +++ b/lib/pleroma/web/api_spec/operations/user_import_operation.ex @@ -123,24 +123,24 @@ def import_collection_request do end def import_archive_request do - %Schema{ - type: :object, - required: [:file], - properties: %{ - file: %Schema{ - description: - "File needs to be uploaded with the multipart request or link to remote file", - anyOf: [ - %Schema{type: :string, format: :binary}, - %Schema{type: :string, format: :uri} - ] - }, - keep_unlisted: %Schema{ - type: :boolean - } + %Schema{ + type: :object, + required: [:file], + properties: %{ + file: %Schema{ + description: + "File needs to be uploaded with the multipart request or link to remote file", + anyOf: [ + %Schema{type: :string, format: :binary}, + %Schema{type: :string, format: :uri} + ] + }, + keep_unlisted: %Schema{ + type: :boolean } } - end + } + end defp ok_response do Operation.response("Ok", "application/json", %Schema{type: :string, example: "ok"}) diff --git a/lib/pleroma/web/mastodon_api/controllers/status_controller.ex b/lib/pleroma/web/mastodon_api/controllers/status_controller.ex index 91777a28f0..01f42f3f64 100644 --- a/lib/pleroma/web/mastodon_api/controllers/status_controller.ex +++ b/lib/pleroma/web/mastodon_api/controllers/status_controller.ex @@ -623,7 +623,10 @@ def translate( end @doc "POST /api/v1/bigbuffet/statuses/translate" - def translate_many(%{body_params: %{ids: status_ids} = params, assigns: %{user: user}} = conn, _) do + def translate_many( + %{body_params: %{ids: status_ids} = params, assigns: %{user: user}} = conn, + _ + ) do with {:language, language} when is_binary(language) <- {:language, Map.get(params, :target_language) || user.language}, {:results, results} <-