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} alias FarmbotCeleryScript.{Compiler, AST, DotProps}
def update_resource(%AST{args: args, body: body}, _env) do def update_resource(%AST{args: args, body: body}, _env) do
quote do quote location: :keep do
unquote(__MODULE__).do_update_resource( mod = unquote(__MODULE__)
unquote(Map.fetch!(args, :resource)), resource = unquote(Map.fetch!(args, :resource))
unquote(unpair(body, %{})), update = unquote(unpair(body, %{}))
params
) mod.do_update_resource(resource, update, params)
end end
end end