diff options
author | Steve <nilslice@gmail.com> | 2016-11-29 12:03:26 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-29 12:03:26 -0800 |
commit | d11d86d73aebc2fc95eedebb166c58962762db2d (patch) | |
tree | 56e99f446ac5343297e9ff72f667930ec89948e9 /system/db/content.go | |
parent | f252472047f86d1bdf956dc59b89541ea0260d68 (diff) | |
parent | c50ae920c84b00eea7e7a896bff5546d1e013c16 (diff) |
Merge pull request #18 from bosssauce/ponzu-dev
[tooling] Add Rails-like content generator for Content Types
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 |