Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0

Update reports.go

Cette révision appartient à :
kilo 2017-10-31 06:21:20 +01:00 révisé par GitHub
Parent eb4cd2e376
révision 5268d25a2d
Aucune clé n'a été trouvée pour cette signature dans la base de données
ID de la clé GPG: 4AEE18F83AFDEB23

Voir le fichier

@ -1,7 +1,6 @@
package moderatorController
import (
"fmt"
"html"
"net/http"
"strconv"
@ -39,13 +38,16 @@ func TorrentReportListPanel(c *gin.Context) {
func TorrentReportDeleteModPanel(c *gin.Context) {
id := c.PostForm("id")
fmt.Println(id)
idNum, _ := strconv.ParseUint(id, 10, 64)
_, _, _ = reports.Delete(uint(idNum))
/* If we need to log report delete activity
if err == nil {
activity.Log(&models.User{}, torrent.Identifier(), "delete", "torrent_report_deleted_by", strconv.Itoa(int(report.ID)), router.GetUser(c).Username)
if c.Request.URL.Query()["all"] != nil {
reports.DeleteAll()
} else {
idNum, _ := strconv.ParseUint(id, 10, 64)
_, _, _ = reports.Delete(uint(idNum))
/* If we need to log report delete activity
if err == nil {
activity.Log(&models.User{}, torrent.Identifier(), "delete", "torrent_report_deleted_by", strconv.Itoa(int(report.ID)), router.GetUser(c).Username)
}
*/
}
*/
c.Redirect(http.StatusSeeOther, "/mod/reports?deleted")
}