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) {
|
||||
posts, err := h.mindflowDB.GetAll()
|
||||
posts, err := h.mindflowDB.Posts()
|
||||
if err != nil {
|
||||
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) {
|
||||
posts, err := h.mindflowDB.GetAll()
|
||||
posts, err := h.mindflowDB.Posts()
|
||||
if err != nil {
|
||||
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) {
|
||||
posts, err := h.mindflowDB.GetAll()
|
||||
posts, err := h.mindflowDB.Posts()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
@ -154,7 +154,7 @@ func (s *SQLiteMindflow) Delete(id int64) error {
|
||||
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()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -4,7 +4,7 @@ type Mindflow interface {
|
||||
New(post *Post) error
|
||||
Edit(post *Post) error
|
||||
Delete(id int64) error
|
||||
GetAll() ([]Post, error)
|
||||
Posts() ([]Post, error)
|
||||
NewCategory(name string) (int64, error)
|
||||
GetCategoryByID(id int64) (string, error)
|
||||
Close() error
|
||||
|
Loading…
Reference in New Issue
Block a user