This commit is contained in:
Jay 2020-04-20 10:06:16 +08:00
parent c726a94227
commit 97b90146ca
1 changed files with 3 additions and 0 deletions

View File

@ -2,6 +2,7 @@ package routes
import ( import (
"encoding/json" "encoding/json"
"fmt"
"rpi-ci-led/pkg/database" "rpi-ci-led/pkg/database"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
@ -31,8 +32,10 @@ func SetRoutes(e *gin.Engine) {
return err return err
} }
if b := bucket.Get([]byte("project")); b == nil { if b := bucket.Get([]byte("project")); b == nil {
fmt.Println("b ::: ", b)
return nil return nil
} else { } else {
fmt.Println("b ::: ", b)
if err := json.Unmarshal(b, &list); err != nil { if err := json.Unmarshal(b, &list); err != nil {
return err return err
} }