|
@@ -16,7 +16,6 @@ import (
|
|
|
"time"
|
|
|
|
|
|
"github.com/dgrijalva/jwt-go"
|
|
|
- "github.com/spf13/viper"
|
|
|
"go.mod/comm"
|
|
|
"go.mod/conf"
|
|
|
"go.mod/dao"
|
|
@@ -305,7 +304,7 @@ func (s *JlService) ProjectExist(projectId int, accountId int) (map[string]inter
|
|
|
return nil, errors.New("计量 校验失败-未找到项目或账号")
|
|
|
}
|
|
|
|
|
|
- debug := GetEnvInfo("DEBUG")
|
|
|
+ debug := utils.GetEnvInfo("DEBUG")
|
|
|
expirationTime := time.Now().Add(6 * time.Second)
|
|
|
tokenString, _ := utils.CreateJlToken(jwt.MapClaims{
|
|
|
"data": map[string]string{"code": projectData.Code, "account": accountData.Account},
|
|
@@ -315,11 +314,6 @@ func (s *JlService) ProjectExist(projectId int, accountId int) (map[string]inter
|
|
|
return map[string]interface{}{"env": debug, "token": tokenString}, nil
|
|
|
}
|
|
|
|
|
|
-func GetEnvInfo(env string) bool {
|
|
|
- viper.AutomaticEnv()
|
|
|
- return viper.GetBool(env)
|
|
|
-}
|
|
|
-
|
|
|
// 项目存在
|
|
|
func (s *JlService) AccountUpdate(claimsData *viewmodels.Jl) error {
|
|
|
|