Skip to content

Commit

Permalink
removing a few references to unsued functions
Browse files Browse the repository at this point in the history
Signed-off-by: rajaspa <[email protected]>
  • Loading branch information
floydtree committed Jan 18, 2024
1 parent 1d8373f commit 06469fd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
3 changes: 0 additions & 3 deletions lib/schema/application.ex
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ defmodule Schema.Application do
{Phoenix.PubSub, [name: Schema.PubSub, adapter: Phoenix.PubSub.PG2]}
]

# initialize the example links
Schema.Examples.init_cache()

# See https://hexdocs.pm/elixir/Supervisor.html
# for other strategies and supported options
opts = [strategy: :one_for_one, name: Schema.Supervisor]
Expand Down
13 changes: 6 additions & 7 deletions lib/schema_web/controllers/page_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ defmodule SchemaWeb.PageController do

class ->
data = Schema.Graph.build(class)

render(conn, "class_graph.html",
extensions: Schema.extensions(),
profiles: SchemaController.get_profiles(params),
Expand All @@ -50,7 +50,7 @@ defmodule SchemaWeb.PageController do

obj ->
data = Schema.Graph.build(obj)

render(conn, "object_graph.html",
extensions: Schema.extensions(),
profiles: SchemaController.get_profiles(params),
Expand Down Expand Up @@ -193,10 +193,9 @@ defmodule SchemaWeb.PageController do
send_resp(conn, 404, "Not Found: #{id}")

data ->
uid = data[:uid]
examples = Schema.Examples.find(uid)
sorted = sort_attributes(data) |> Map.put(:examples, examples)

#uid = data[:uid]
sorted = sort_attributes(data)

render(conn, "class.html",
extensions: Schema.extensions(),
profiles: SchemaController.get_profiles(params),
Expand Down Expand Up @@ -251,7 +250,7 @@ defmodule SchemaWeb.PageController do
end

defp sort_classes(categories) do
Map.update!(categories, :attributes, fn list ->
Map.update!(categories, :attributes, fn list ->
Enum.map(list, fn {name, category} ->
{name, Map.update!(category, :classes, &sort_by(&1, :uid))}
end)
Expand Down

0 comments on commit 06469fd

Please sign in to comment.