From ee80c9edb277248bb31d5164fea75d191a467d6d Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Sat, 12 Jun 2021 21:52:48 -0600 Subject: [PATCH] save new entries --- src/nat/Archive.kiss | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/nat/Archive.kiss b/src/nat/Archive.kiss index 4fd729b..a6c7236 100644 --- a/src/nat/Archive.kiss +++ b/src/nat/Archive.kiss @@ -20,6 +20,7 @@ (defmethod :Entry createEntry [template] (let [e (_newEntry)] (.prepareEntry (dictGet templates template) e) + (saveEntry e) (doFor system systems (system.checkEntryInOrOut this e)) e)) @@ -27,13 +28,7 @@ (defmethod saveEntry [:Entry e] (File.saveContent (Path.join [archiveDir "entries" (e.id.withExtension "json")]) - (Json.stringify e)) - - // TODO save its components? but it's not obvious how, because it only knows the string keys of them. - // Better yet, retrieving components with mutable access should be done through a - // (withComponent...) macro that serializes the component after the block is done. - // - ) + (Json.stringify e))) (defun :Entry _newEntry [] (object