Fixed GetAll() method.
This commit is contained in:
parent
0f9b365b2c
commit
a0995a0e97
@ -159,6 +159,7 @@ func (s *SQLiteMindflow) GetAll() (posts []mindflow.Post, err error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
defer tx.Rollback()
|
||||||
|
|
||||||
rows, err := tx.Stmt(stmtPostGetAll).Query()
|
rows, err := tx.Stmt(stmtPostGetAll).Query()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -179,8 +180,9 @@ func (s *SQLiteMindflow) GetAll() (posts []mindflow.Post, err error) {
|
|||||||
posts = append(posts, post)
|
posts = append(posts, post)
|
||||||
}
|
}
|
||||||
|
|
||||||
defer tx.Rollback()
|
tx.Commit()
|
||||||
return nil, nil
|
|
||||||
|
return posts, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *SQLiteMindflow) NewCategory(name string) (int64, error) {
|
func (s *SQLiteMindflow) NewCategory(name string) (int64, error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user