Fix the route path in LinkController.create/2.

This commit is contained in:
2023-08-01 17:59:34 +03:00
parent 8f6ec31366
commit 62e855e1b6
2 changed files with 3 additions and 1 deletions
@@ -15,7 +15,7 @@ defmodule LinkShortenerWeb.Api.V1.LinkController do
with {:ok, %Link{} = link} <- Links.insert_one(link_params) do
conn
|> put_status(:created)
|> put_resp_header("location", Routes.link_path(conn, :show, link))
|> put_resp_header("location", Routes.v1_link_path(conn, :show, link))
|> render("show.json", link: link)
end
end