HOTFIX: Crashing server on description == 230 chars
This commit is contained in:
parent
898fee21b8
commit
df02ebf00d
|
@ -148,7 +148,7 @@ func GetLEpisode(c *gin.Context) {
|
||||||
database.Db.Model(&LP).Related(&AT)
|
database.Db.Model(&LP).Related(&AT)
|
||||||
var DEP []gin.H
|
var DEP []gin.H
|
||||||
for _, EP := range EPs {
|
for _, EP := range EPs {
|
||||||
if len(EP.Descr.String) >= 230 {
|
if len(EP.Descr.String) > 230 {
|
||||||
ints := []rune(EP.Descr.String)
|
ints := []rune(EP.Descr.String)
|
||||||
EP.Descr.String = string(ints[:230]) + "…"
|
EP.Descr.String = string(ints[:230]) + "…"
|
||||||
}
|
}
|
||||||
|
@ -169,7 +169,7 @@ func GetLEpisode(c *gin.Context) {
|
||||||
database.Db.Model(&LP).Related(&AT)
|
database.Db.Model(&LP).Related(&AT)
|
||||||
var DEP []gin.H
|
var DEP []gin.H
|
||||||
for _, EP := range EPs {
|
for _, EP := range EPs {
|
||||||
if len(EP.Descr.String) >= 230 {
|
if len(EP.Descr.String) > 230 {
|
||||||
ints := []rune(EP.Descr.String)
|
ints := []rune(EP.Descr.String)
|
||||||
EP.Descr.String = string(ints[:230]) + "…"
|
EP.Descr.String = string(ints[:230]) + "…"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue