From d322476430b5c777eed771597d6150e0015acc9f Mon Sep 17 00:00:00 2001 From: Marcin Kulik Date: Thu, 9 May 2024 21:43:54 +0200 Subject: [PATCH] Add missing () in |> --- lib/asciinema/file_store/local.ex | 2 +- lib/asciinema/file_store/s3.ex | 2 +- lib/asciinema_web/auth.ex | 4 ++-- lib/asciinema_web/controllers/recording_controller.ex | 2 +- lib/asciinema_web/plug/return_to.ex | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/asciinema/file_store/local.ex b/lib/asciinema/file_store/local.ex index 6c49e2c89..a2476913b 100644 --- a/lib/asciinema/file_store/local.ex +++ b/lib/asciinema/file_store/local.ex @@ -42,7 +42,7 @@ defmodule Asciinema.FileStore.Local do conn |> put_resp_header("content-type", MIME.from_path(path)) |> send_file(200, full_path(path)) - |> halt + |> halt() end @impl true diff --git a/lib/asciinema/file_store/s3.ex b/lib/asciinema/file_store/s3.ex index fe914bbdc..87d5ecc2e 100644 --- a/lib/asciinema/file_store/s3.ex +++ b/lib/asciinema/file_store/s3.ex @@ -77,7 +77,7 @@ defmodule Asciinema.FileStore.S3 do @impl true def open_file(path, function \\ nil) do - response = bucket() |> S3.get_object(base_path() <> path) |> make_request + response = bucket() |> S3.get_object(base_path() <> path) |> make_request() with {:ok, %{headers: headers, body: body}} <- response do body = diff --git a/lib/asciinema_web/auth.ex b/lib/asciinema_web/auth.ex index e2152aa67..d63579663 100644 --- a/lib/asciinema_web/auth.ex +++ b/lib/asciinema_web/auth.ex @@ -69,10 +69,10 @@ defmodule AsciinemaWeb.Auth do msg = Keyword.get(opts, :flash, "Please log in first.") conn - |> save_return_path + |> save_return_path() |> put_flash(:info, msg) |> redirect(to: Routes.login_path(conn, :new)) - |> halt + |> halt() end def require_admin(%Conn{assigns: %{current_user: %User{is_admin: true}}} = conn, _) do diff --git a/lib/asciinema_web/controllers/recording_controller.ex b/lib/asciinema_web/controllers/recording_controller.ex index d1d9ef68d..b6e52ad53 100644 --- a/lib/asciinema_web/controllers/recording_controller.ex +++ b/lib/asciinema_web/controllers/recording_controller.ex @@ -145,7 +145,7 @@ defmodule AsciinemaWeb.RecordingController do |> put_resp_content_type(MIME.from_path(png_path)) |> put_resp_header("cache-control", "public, max-age=#{@png_max_age}") |> send_file(200, png_path) - |> halt + |> halt() {:error, :busy} -> conn diff --git a/lib/asciinema_web/plug/return_to.ex b/lib/asciinema_web/plug/return_to.ex index 22c75795f..f60597bd7 100644 --- a/lib/asciinema_web/plug/return_to.ex +++ b/lib/asciinema_web/plug/return_to.ex @@ -16,9 +16,9 @@ defmodule AsciinemaWeb.Plug.ReturnTo do end conn - |> clear_return_path + |> clear_return_path() |> redirect(target) - |> halt + |> halt() end def clear_return_path(conn) do