This commit is contained in:
Jay 2020-04-20 10:06:16 +08:00
parent c726a94227
commit 97b90146ca

View File

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