mirror of
https://github.com/mgerb/classic-wow-forums
synced 2026-01-12 10:02:49 +00:00
switch from yarn to npm - other minor updates
This commit is contained in:
@@ -26,13 +26,6 @@ defmodule MyApp.Data.Reply do
|
||||
end
|
||||
|
||||
# allow user to update reply
|
||||
defp user_update_changeset(reply, params \\ %{}) do
|
||||
reply
|
||||
|> cast(params, [:content])
|
||||
|> force_change(:edited, true) # set edited flag on update
|
||||
|> validate_required([:content])
|
||||
end
|
||||
|
||||
@spec insert(map) :: {:ok, map} | {:error, map}
|
||||
def insert(params) do
|
||||
{:ok, data} = Repo.transaction(fn ->
|
||||
|
||||
@@ -50,10 +50,8 @@ defmodule MyAppWeb.ReplyController do
|
||||
|
||||
@spec mod_update(map, map) :: any
|
||||
def mod_update(conn, params) do
|
||||
{:ok, _} = Data.Reply.mod_update(params)
|
||||
conn
|
||||
|> put_status(200)
|
||||
|> Response.json("ok")
|
||||
Data.Reply.mod_update(params)
|
||||
Response.json(conn, "ok")
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user