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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user