Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0

clear cache on upload

Cette révision appartient à :
Eliot Whalan 2017-05-11 04:05:22 +10:00
Parent 314149cca4
révision 68cdf35f24
Aucune clé n'a été trouvée pour cette signature dans la base de données
ID de la clé GPG: C0A42175139840D6

Voir le fichier

@ -14,6 +14,7 @@ import (
"strconv"
"strings"
"github.com/ewhal/nyaa/cache"
"github.com/ewhal/nyaa/config"
"github.com/ewhal/nyaa/service/captcha"
"github.com/ewhal/nyaa/util"
@ -94,6 +95,7 @@ func (f *UploadForm) ExtractInfo(r *http.Request) error {
f.Name = util.TrimWhitespaces(f.Name)
f.Description = p.Sanitize(util.TrimWhitespaces(f.Description))
f.Magnet = util.TrimWhitespaces(f.Magnet)
cache.Clear()
catsSplit := strings.Split(f.Category, "_")
// need this to prevent out of index panics