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 {
|
||||
return nil, err
|
||||
}
|
||||
defer tx.Rollback()
|
||||
|
||||
rows, err := tx.Stmt(stmtPostGetAll).Query()
|
||||
if err != nil {
|
||||
@ -179,8 +180,9 @@ func (s *SQLiteMindflow) GetAll() (posts []mindflow.Post, err error) {
|
||||
posts = append(posts, post)
|
||||
}
|
||||
|
||||
defer tx.Rollback()
|
||||
return nil, nil
|
||||
tx.Commit()
|
||||
|
||||
return posts, nil
|
||||
}
|
||||
|
||||
func (s *SQLiteMindflow) NewCategory(name string) (int64, error) {
|
||||
|
Loading…
Reference in New Issue
Block a user