clear cache on upload
Cette révision appartient à :
Parent
0223f575d3
révision
e344896b2c
1 fichiers modifiés avec 2 ajouts et 0 suppressions
|
@ -14,6 +14,7 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/ewhal/nyaa/cache"
|
||||||
"github.com/ewhal/nyaa/config"
|
"github.com/ewhal/nyaa/config"
|
||||||
"github.com/ewhal/nyaa/service/captcha"
|
"github.com/ewhal/nyaa/service/captcha"
|
||||||
"github.com/ewhal/nyaa/util"
|
"github.com/ewhal/nyaa/util"
|
||||||
|
@ -94,6 +95,7 @@ func (f *UploadForm) ExtractInfo(r *http.Request) error {
|
||||||
f.Name = util.TrimWhitespaces(f.Name)
|
f.Name = util.TrimWhitespaces(f.Name)
|
||||||
f.Description = p.Sanitize(util.TrimWhitespaces(f.Description))
|
f.Description = p.Sanitize(util.TrimWhitespaces(f.Description))
|
||||||
f.Magnet = util.TrimWhitespaces(f.Magnet)
|
f.Magnet = util.TrimWhitespaces(f.Magnet)
|
||||||
|
cache.Clear()
|
||||||
|
|
||||||
catsSplit := strings.Split(f.Category, "_")
|
catsSplit := strings.Split(f.Category, "_")
|
||||||
// need this to prevent out of index panics
|
// need this to prevent out of index panics
|
||||||
|
|
Référencer dans un nouveau ticket