Created
December 2, 2016 21:12
-
-
Save ConnorRigby/7613f03d1d3174758d4dc4b83ae82765 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iex(1)> h Farmbot.Sync.Database.Device.validate | |
def validate(map) | |
Makes sure an object can be built given keys: ["id", "planting_area_id", | |
"name", "webcam_url"] | |
• makes sure map is not empty | |
• makes sure we have atleast: ["id", "planting_area_id", "name", | |
"webcam_url"] | |
• Runs any defined mutations | |
• returns { :ok, %Elixir.Farmbot.Sync.Database.Device{} } | |
iex(2)> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment