Browse Source

fix empty egg bug

master^2
Collapseyu 2 months ago
parent
commit
07f0e2d7cc
  1. 4
      api/pkg/variable/main.go

4
api/pkg/variable/main.go

@ -103,6 +103,10 @@ func CheckEasterEgg(key string) (link string, miL int, maL int, err error) { @@ -103,6 +103,10 @@ func CheckEasterEgg(key string) (link string, miL int, maL int, err error) {
fmt.Println(key)
// take the value of "easteregg" from the result of mongo
oriEgg := temp[0]
if(oriEgg["value"].(string)==""){
miL = 100
return
}
eggDict, miL, maL, err = SplitString(oriEgg["value"].(string))
for k, v := range eggDict {
tmpLength := len(k)

Loading…
Cancel
Save