fix
This commit is contained in:
parent
aa68871e8d
commit
c726a94227
@ -26,7 +26,10 @@ func SetRoutes(e *gin.Engine) {
|
||||
var list []string = make([]string, 0)
|
||||
db := database.Get()
|
||||
err := db.View(func(tx *bbolt.Tx) error {
|
||||
bucket := tx.Bucket([]byte("led"))
|
||||
bucket, err := tx.CreateBucketIfNotExists([]byte("led"))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if b := bucket.Get([]byte("project")); b == nil {
|
||||
return nil
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user