From e07e5f35cd5f56f807148c963053abdef4d4a2c5 Mon Sep 17 00:00:00 2001 From: Philippe Pittoli Date: Fri, 14 Jul 2023 07:45:52 +0200 Subject: [PATCH] Add a (still commented) function to refactor update code. --- src/App/ZoneInterface.purs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/App/ZoneInterface.purs b/src/App/ZoneInterface.purs index 97fcafa..b20292c 100644 --- a/src/App/ZoneInterface.purs +++ b/src/App/ZoneInterface.purs @@ -477,6 +477,18 @@ handleAction = case _ of $ DNSManager.MkAddRR { domain: d, rr: newrr } H.raise $ MessageToSend message +-- try_update_entry d validation v t = case v of +-- Nothing -> H.raise $ Log $ SimpleLog $ "Cannot find " <> t <> " RR with this rrid" +-- Just local_rr -> do +-- case validation local_rr of +-- Left _ -> H.raise $ Log $ SimpleLog $ "Cannot update this " <> t <> " RR, some errors occured in the record" +-- Right rr -> do +-- H.raise $ Log $ SimpleLog $ "Save " <> t <> " RR" +-- message <- H.liftEffect +-- $ DNSManager.serialize +-- $ DNSManager.MkUpdateRR { domain: d, rr: rr } +-- H.raise $ MessageToSend message + handleQuery :: forall a m. MonadAff m => Query a -> H.HalogenM State Action () Output m (Maybe a) handleQuery = case _ of