pull/1200/head
Rick Carlino 2020-05-08 17:47:20 -05:00
parent b820a40ac4
commit 53a87744f3
1 changed files with 6 additions and 6 deletions

View File

@ -2,12 +2,12 @@ defmodule FarmbotCeleryScript.Compiler.UpdateResource do
alias FarmbotCeleryScript.{Compiler, AST, DotProps}
def update_resource(%AST{args: args, body: body}, _env) do
quote do
unquote(__MODULE__).do_update_resource(
unquote(Map.fetch!(args, :resource)),
unquote(unpair(body, %{})),
params
)
quote location: :keep do
mod = unquote(__MODULE__)
resource = unquote(Map.fetch!(args, :resource))
update = unquote(unpair(body, %{}))
mod.do_update_resource(resource, update, params)
end
end