|
|
@@ -351,7 +351,7 @@ func InviteUrl(c *gin.Context) { |
|
|
|
continue |
|
|
|
} |
|
|
|
jsonByte, _ := hit.Source.MarshalJSON() |
|
|
|
if gjson.Get(string(jsonByte), "short_link").String() != "" { |
|
|
|
if gjson.Get(string(jsonByte), "short_link").String() != "" && gjson.Get(string(jsonByte), "date").Int() > time.Now().Unix() { |
|
|
|
isHas = 1 |
|
|
|
link = gjson.Get(string(jsonByte), "short_link").String() |
|
|
|
} |
|
|
@@ -367,6 +367,7 @@ func InviteUrl(c *gin.Context) { |
|
|
|
"uid": user.Id, |
|
|
|
"link": oldLink, |
|
|
|
"short_link": link, |
|
|
|
"date": time.Now().Unix() + 365*86400, |
|
|
|
} |
|
|
|
doc, _ := es.FirstDoc(EggUserShortLink, uniqueId) |
|
|
|
if doc == nil { |
|
|
|