Skip to content

Commit

Permalink
Add missing () in |>
Browse files Browse the repository at this point in the history
  • Loading branch information
ku1ik committed May 9, 2024
1 parent 68a675e commit d322476
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/asciinema/file_store/local.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/asciinema/file_store/s3.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
4 changes: 2 additions & 2 deletions lib/asciinema_web/auth.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/asciinema_web/controllers/recording_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions lib/asciinema_web/plug/return_to.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d322476

Please sign in to comment.