Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0
Cette révision appartient à :
akuma06 2017-05-11 04:16:37 +02:00
Parent 4c277cc179
révision b44c37a67a

Voir le fichier

@ -41,7 +41,7 @@ func UploadHandler(w http.ResponseWriter, r *http.Request) {
}
var sameTorrents int
db.ORM.Model(&model.Torrent{}).Where("torrent_hash = ?", uploadForm.Infohash).Count(&sameTorrents)
if (sameTorrents > 0) {
if (sameTorrents == 0) {
//add to db and redirect depending on result
torrent := model.Torrent{
Name: uploadForm.Name,