mirror of
https://github.com/semaphoreui/semaphore.git
synced 2024-11-23 12:30:41 +01:00
fix(be): boltdb backet validation
This commit is contained in:
parent
b0d0561966
commit
0e7c8b7f63
BIN
192.168.185.10:3306
Normal file
BIN
192.168.185.10:3306
Normal file
Binary file not shown.
@ -216,6 +216,10 @@ func (d *BoltDb) getObjects(bucketID int, props db.ObjectProperties, params db.R
|
||||
return d.db.View(func(tx *bbolt.Tx) error {
|
||||
|
||||
b := tx.Bucket(makeBucketId(props, bucketID))
|
||||
if b == nil {
|
||||
return db.ErrNotFound
|
||||
}
|
||||
|
||||
c := b.Cursor()
|
||||
|
||||
return unmarshalObjects(c, props, params, filter, objects)
|
||||
|
@ -2,9 +2,12 @@ package factory
|
||||
|
||||
import (
|
||||
"github.com/ansible-semaphore/semaphore/db"
|
||||
"github.com/ansible-semaphore/semaphore/db/sql"
|
||||
"github.com/ansible-semaphore/semaphore/db/bolt"
|
||||
|
||||
//"github.com/ansible-semaphore/semaphore/db/sql"
|
||||
)
|
||||
|
||||
func CreateStore() db.Store {
|
||||
return &sql.SqlDb{}
|
||||
return &bolt.BoltDb{}
|
||||
//return &sql.SqlDb{}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user