diff options
author | Steve Manuel <nilslice@gmail.com> | 2016-11-28 15:14:56 -0800 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2016-11-28 15:14:56 -0800 |
commit | 556bec10bc70e33660c5c0801fe9452e226fabc8 (patch) | |
tree | 948a0498a21524deba4dc73b1aa2d3cc91a3bbf9 /system/db/content.go | |
parent | 553235a85fd013ae91173f15ec74503347573cd6 (diff) |
adding uuid dep and implementation for content.Item
Diffstat (limited to 'system/db/content.go')
-rw-r--r-- | system/db/content.go | 5 |
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 |