Rename the Links.get_one_by_name to get_one_by_shorten.

This commit is contained in:
2023-07-06 20:01:53 +03:00
parent c17b323566
commit 2e3f3d3901
3 changed files with 5 additions and 3 deletions
+2
View File
@@ -5,4 +5,6 @@
Added README and CHANGELOG. Added README and CHANGELOG.
** 0.1.1 <2023-07-06 Thu> ** 0.1.1 <2023-07-06 Thu>
Updated the Links model to have a unique shorten. Updated the Links model to have a unique shorten.
** 0.1.2 <2023-07-06 Thu>
Renamed the Links.get_one_by_name to get_one_by_shorten.
+2 -2
View File
@@ -52,8 +52,8 @@ defmodule LinkShortener.Links do
Repo.get_by(Links, attrs) Repo.get_by(Links, attrs)
end end
def get_one_by_name(name) do def get_one_by_shorten(shorten) do
get_one_by(%{name: name}) get_one_by(%{shorten: shorten})
end end
def get_one(id) do def get_one(id) do
+1 -1
View File
@@ -4,7 +4,7 @@ defmodule LinkShortener.MixProject do
def project do def project do
[ [
app: :link_shortener, app: :link_shortener,
version: "0.1.0", version: "0.1.2",
elixir: "~> 1.12", elixir: "~> 1.12",
elixirc_paths: elixirc_paths(Mix.env()), elixirc_paths: elixirc_paths(Mix.env()),
compilers: [] ++ Mix.compilers(), compilers: [] ++ Mix.compilers(),