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

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,