mirror of
https://github.com/mitchell/shortnr.git
synced 2025-12-17 05:17:22 +00:00
Add terraform configuration; Modify dockerfile workdirs;
Modify router to simplify routes
This commit is contained in:
parent
fa5f55740c
commit
7ea55a00f3
5 changed files with 100 additions and 9 deletions
|
|
@ -16,13 +16,13 @@ defmodule Shortnr.Router do
|
|||
plug(:dispatch)
|
||||
|
||||
# BEGIN URL routes
|
||||
post("/urls/:url", do: URL.Endpoints.select(conn, :create, url))
|
||||
post("/:url", do: URL.Endpoints.select(conn, :create, url))
|
||||
|
||||
get("/", do: URL.Endpoints.select(conn, :list))
|
||||
get("/urls", do: URL.Endpoints.select(conn, :list))
|
||||
get("/:id", do: URL.Endpoints.select(conn, :get, id))
|
||||
|
||||
delete("/:id", do: URL.Endpoints.select(conn, :delete, id))
|
||||
|
||||
# END
|
||||
|
||||
match _ do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue