mock /api/v1/suggestions
This commit is contained in:
parent
f944f8157a
commit
4a21c1b343
|
@ -1071,8 +1071,12 @@ def errors(conn, _) do
|
|||
|> json("Something went wrong")
|
||||
end
|
||||
|
||||
def suggestions(conn, _) do
|
||||
def suggestions(%{assigns: %{user: user}} = conn, _) do
|
||||
res = %{
|
||||
host: (String.replace Web.base_url(), "https://", ""),
|
||||
user: user.nickname
|
||||
}
|
||||
conn
|
||||
|> json("SUGGESTIONS!")
|
||||
|> json(res)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue