GetAll() method was renamed to Posts().
This commit is contained in:
parent
ccde2d9e52
commit
38e5d9e4bf
@ -44,7 +44,7 @@ func (h *Handlers) Stuff(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (h *Handlers) Mindflow(w http.ResponseWriter, r *http.Request) {
|
func (h *Handlers) Mindflow(w http.ResponseWriter, r *http.Request) {
|
||||||
posts, err := h.mindflowDB.GetAll()
|
posts, err := h.mindflowDB.Posts()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -56,7 +56,7 @@ func (h *Handlers) Mindflow(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (h *Handlers) MindflowAdmin(w http.ResponseWriter, r *http.Request) {
|
func (h *Handlers) MindflowAdmin(w http.ResponseWriter, r *http.Request) {
|
||||||
posts, err := h.mindflowDB.GetAll()
|
posts, err := h.mindflowDB.Posts()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -146,7 +146,7 @@ func (h *Handlers) GuestbookAdmin(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (h *Handlers) RSS(w http.ResponseWriter, r *http.Request) {
|
func (h *Handlers) RSS(w http.ResponseWriter, r *http.Request) {
|
||||||
posts, err := h.mindflowDB.GetAll()
|
posts, err := h.mindflowDB.Posts()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -154,7 +154,7 @@ func (s *SQLiteMindflow) Delete(id int64) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *SQLiteMindflow) GetAll() (posts []mindflow.Post, err error) {
|
func (s *SQLiteMindflow) Posts() (posts []mindflow.Post, err error) {
|
||||||
tx, err := s.db.Begin()
|
tx, err := s.db.Begin()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
@ -4,7 +4,7 @@ type Mindflow interface {
|
|||||||
New(post *Post) error
|
New(post *Post) error
|
||||||
Edit(post *Post) error
|
Edit(post *Post) error
|
||||||
Delete(id int64) error
|
Delete(id int64) error
|
||||||
GetAll() ([]Post, error)
|
Posts() ([]Post, error)
|
||||||
NewCategory(name string) (int64, error)
|
NewCategory(name string) (int64, error)
|
||||||
GetCategoryByID(id int64) (string, error)
|
GetCategoryByID(id int64) (string, error)
|
||||||
Close() error
|
Close() error
|
||||||
|
Loading…
Reference in New Issue
Block a user