Skip to content

Commit

Permalink
Removed unused channels capability
Browse files Browse the repository at this point in the history
  • Loading branch information
Kalimaha committed Apr 3, 2018
1 parent 86481eb commit 4ac0946
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 55 deletions.
2 changes: 0 additions & 2 deletions lib/weather_station_manager/endpoint.ex
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
defmodule WeatherStationManager.Endpoint do
use Phoenix.Endpoint, otp_app: :weather_station_manager

socket "/socket", WeatherStationManager.UserSocket

# Serve at "/" the static files from "priv/static" directory.
#
# You should set gzip to true if you are running phoenix.digest
Expand Down
1 change: 0 additions & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ defmodule WeatherStationManager.Mixfile do
# Type `mix help deps` for examples and options.
defp deps do
[{:phoenix, "~> 1.2.5"},
{:phoenix_pubsub, "~> 1.0"},
{:phoenix_ecto, "~> 3.0"},
{:postgrex, ">= 0.0.0"},
{:gettext, "~> 0.11"},
Expand Down
2 changes: 0 additions & 2 deletions test/models/update_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ defmodule WeatherStationManager.UpdateTest do

alias WeatherStationManager.Update

@invalid_attributes %{ :spam => "eggs" }
@valid_attributes %{
:station => "South Yarra",
:lat => 42.0,
Expand All @@ -17,4 +16,3 @@ defmodule WeatherStationManager.UpdateTest do
assert changeset.valid?
end
end

37 changes: 0 additions & 37 deletions web/channels/user_socket.ex

This file was deleted.

3 changes: 1 addition & 2 deletions web/models/update.ex
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ defmodule WeatherStationManager.Update do
field :lon, :float
field :temperature, :float

timestamps
timestamps()
end

def changeset(struct, params \\ %{}) do
struct
|> cast(params, [:station, :lat, :lon, :temperature])
end
end

11 changes: 0 additions & 11 deletions web/web.ex
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,6 @@ defmodule WeatherStationManager.Web do
end
end

def channel do
quote do
use Phoenix.Channel

alias WeatherStationManager.Repo
import Ecto
import Ecto.Query
import WeatherStationManager.Gettext
end
end

@doc """
When used, dispatch to the appropriate controller/view/etc.
"""
Expand Down

0 comments on commit 4ac0946

Please sign in to comment.