1
0
mirror of https://github.com/mgerb/classic-wow-forums synced 2026-01-11 17:42:48 +00:00

authentication with persistence working

This commit is contained in:
2018-01-01 18:55:00 -06:00
parent e856cc5172
commit 135ce3a5d6
14 changed files with 172 additions and 38 deletions

View File

@@ -19,4 +19,9 @@ defmodule MyAppWeb.Response do
Phoenix.Controller.json(conn, output)
end
# generatic function for converting data to response code
@spec put_resp({:ok, any} | {:error, any}) :: {any, integer}
def put_resp({:ok, data}), do: {data, 200}
def put_resp({:error, error}), do: {error, 400}
end