Skip to content

Commit

Permalink
Use uniform name add_tag
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonkopliku committed Apr 15, 2022
1 parent e1a809a commit d5898d0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/trento/application/usecases/tags/tags.ex
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ defmodule Trento.Tags do

@type taggable_resource :: :host | :cluster | :sap_system | :database

@spec create_tag(String.t(), Ecto.UUID.t(), taggable_resource) ::
@spec add_tag(String.t(), Ecto.UUID.t(), taggable_resource) ::
{:ok, Ecto.Schema.t()} | {:error, any}
def create_tag(value, resource_id, resource_type) do
def add_tag(value, resource_id, resource_type) do
changeset =
Tag.changeset(%Tag{}, %{
value: value,
Expand Down
2 changes: 1 addition & 1 deletion lib/trento_web/controllers/tags_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ defmodule TrentoWeb.TagsController do
"value" => value
}
) do
case Tags.create_tag(value, id, resource_type) do
case Tags.add_tag(value, id, resource_type) do
{:ok, _} ->
conn
|> put_status(:created)
Expand Down

0 comments on commit d5898d0

Please sign in to comment.