From 556bec10bc70e33660c5c0801fe9452e226fabc8 Mon Sep 17 00:00:00 2001 From: Steve Manuel Date: Mon, 28 Nov 2016 15:14:56 -0800 Subject: adding uuid dep and implementation for content.Item --- system/db/content.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'system') 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 -- cgit v1.2.3