Basic RESTful actions for cards.
This commit is contained in:
+5
-3
@@ -7,9 +7,11 @@ defmodule Bwc do
|
||||
|
||||
@repo Repo
|
||||
|
||||
@doc """
|
||||
List all cards.
|
||||
"""
|
||||
|
||||
def get_title do
|
||||
|
||||
end
|
||||
|
||||
def list_cards, do: @repo.all(Card)
|
||||
|
||||
def get_card(id), do: @repo.get!(Card, id)
|
||||
|
||||
@@ -10,7 +10,8 @@ defmodule Bwc.Application do
|
||||
children = [
|
||||
# Starts a worker by calling: Bwc.Worker.start_link(arg)
|
||||
# {Bwc.Worker, arg}
|
||||
{Bwc.Repo, []}
|
||||
{Bwc.Repo, []},
|
||||
{Phoenix.PubSub, [name: Bwc.PubSub, adapter: Phoenix.PubSub.PG2]}
|
||||
]
|
||||
|
||||
# See https://hexdocs.pm/elixir/Supervisor.html
|
||||
|
||||
Reference in New Issue
Block a user