summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/db/content.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/system/db/content.go b/system/db/content.go
index b43d611..0cfadf4 100644
--- a/system/db/content.go
+++ b/system/db/content.go
@@ -16,6 +16,7 @@ import (
"github.com/boltdb/bolt"
"github.com/gorilla/schema"
+ uuid "github.com/satori/go.uuid"
)
// SetContent inserts or updates values in the database.
@@ -107,6 +108,10 @@ func insert(ns string, data url.Values) (int, error) {
}
data.Set("id", cid)
+ // add UUID to data for use in embedded Item
+ uid := uuid.NewV4()
+ data.Set("uuid", uid.String())
+
j, err := postToJSON(ns, data)
if err != nil {
return err