1
0

Fixed GetAll() method.

This commit is contained in:
Alexander Andreev 2023-05-20 06:26:30 +04:00
parent 0f9b365b2c
commit a0995a0e97
Signed by: Arav
GPG Key ID: D22A817D95815393

View File

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