1
0

GetAll() method was renamed to Posts().

This commit is contained in:
Alexander Andreev 2023-05-22 05:21:00 +04:00
parent ccde2d9e52
commit 38e5d9e4bf
Signed by: Arav
GPG Key ID: D22A817D95815393
3 changed files with 5 additions and 5 deletions

View File

@ -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
} }

View File

@ -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

View File

@ -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