summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/logikorr/servlet.clj15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/logikorr/servlet.clj b/src/logikorr/servlet.clj
index 754c3ec..5ade9a8 100644
--- a/src/logikorr/servlet.clj
+++ b/src/logikorr/servlet.clj
@@ -25,12 +25,15 @@
(defn ds-update
"Update the corresponding entity from the supplied map in the data store."
- [map]
- (let [datastore (DatastoreServiceFactory/getDatastoreService),
- entity (.get datastore #^Key (:key map))]
- (doseq [[key value] (dissoc map :kind :key)]
- (.setProperty entity (name key) value))
- (.put datastore entity)))
+ [& entity-maps]
+ (let [datastore (DatastoreServiceFactory/getDatastoreService)]
+ (.put datastore
+ (map (fn [entity-map]
+ (let [entity (.get datastore #^Key (:key entity-map))]
+ (doseq [[key value] (dissoc entity-map :kind :key)]
+ (.setProperty entity (name key) value))
+ entity))
+ entity-maps))))
(def *static-directory* "/Users/mulk/Dropbox/Projekte/LogiCLJ/war")