Update template.go
Cette révision appartient à :
Parent
9b2b05b24a
révision
97b8171bd9
|
@ -173,9 +173,14 @@ func userProfileBase(c *gin.Context, templateName string, userProfile *models.Us
|
||||||
} else {
|
} else {
|
||||||
_, userProfile.Torrents, nbTorrents, _ = search.ByQuery(c, 1, true, false, true)
|
_, userProfile.Torrents, nbTorrents, _ = search.ByQuery(c, 1, true, false, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var uploadedSize int64
|
||||||
|
for _, torrent := range userProfile.Torrents {
|
||||||
|
uploadedSize += 64
|
||||||
|
}
|
||||||
|
|
||||||
variables.Set("UserProfile", userProfile)
|
variables.Set("UserProfile", userProfile)
|
||||||
variables.Set("NbTorrents", nbTorrents)
|
variables.Set("NbTorrents", []int64{int64(nbTorrents),uploadedSize})
|
||||||
Render(c, path.Join(SiteDir, "user", templateName), variables)
|
Render(c, path.Join(SiteDir, "user", templateName), variables)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Référencer dans un nouveau ticket