Basic RESTful actions for cards.

This commit is contained in:
2020-12-28 19:54:28 -08:00
parent 4a31d8a31b
commit 6266b089a5
25 changed files with 427 additions and 102 deletions
+5 -3
View File
@@ -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)
+2 -1
View File
@@ -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