summaryrefslogtreecommitdiff
path: root/content/post.go
diff options
context:
space:
mode:
Diffstat (limited to 'content/post.go')
-rw-r--r--content/post.go17
1 files changed, 8 insertions, 9 deletions
diff --git a/content/post.go b/content/post.go
index 65ea88f..1dfb8fb 100644
--- a/content/post.go
+++ b/content/post.go
@@ -4,29 +4,28 @@ import (
"fmt"
"github.com/nilslice/cms/management/editor"
- "github.com/nilslice/cms/system/db"
)
// Post is the generic content struct
type Post struct {
- db.Item
+ Item
editor editor.Editor
- Title []byte `json:"title"`
- Content []byte `json:"content"`
- Author []byte `json:"author"`
- Timestamp []byte `json:"timestamp"`
+ Title string `json:"title"`
+ Content string `json:"content"`
+ Author string `json:"author"`
+ Timestamp string `json:"timestamp"`
}
func init() {
- Types["Post"] = Post{}
+ Types["Post"] = &Post{}
}
// ContentID partially implements editor.Editable
-func (p Post) ContentID() int { return p.ID }
+func (p *Post) ContentID() int { return p.ID }
// Editor partially implements editor.Editable
-func (p Post) Editor() *editor.Editor { return &p.editor }
+func (p *Post) Editor() *editor.Editor { return &p.editor }
// MarshalEditor writes a buffer of html to edit a Post and partially implements editor.Editable
func (p Post) MarshalEditor() ([]byte, error) {