Update reports.go
Cette révision appartient à :
Parent
eb4cd2e376
révision
5268d25a2d
1 fichiers modifiés avec 10 ajouts et 8 suppressions
|
@ -1,7 +1,6 @@
|
||||||
package moderatorController
|
package moderatorController
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"html"
|
"html"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
@ -39,7 +38,9 @@ func TorrentReportListPanel(c *gin.Context) {
|
||||||
func TorrentReportDeleteModPanel(c *gin.Context) {
|
func TorrentReportDeleteModPanel(c *gin.Context) {
|
||||||
id := c.PostForm("id")
|
id := c.PostForm("id")
|
||||||
|
|
||||||
fmt.Println(id)
|
if c.Request.URL.Query()["all"] != nil {
|
||||||
|
reports.DeleteAll()
|
||||||
|
} else {
|
||||||
idNum, _ := strconv.ParseUint(id, 10, 64)
|
idNum, _ := strconv.ParseUint(id, 10, 64)
|
||||||
_, _, _ = reports.Delete(uint(idNum))
|
_, _, _ = reports.Delete(uint(idNum))
|
||||||
/* If we need to log report delete activity
|
/* If we need to log report delete activity
|
||||||
|
@ -47,5 +48,6 @@ func TorrentReportDeleteModPanel(c *gin.Context) {
|
||||||
activity.Log(&models.User{}, torrent.Identifier(), "delete", "torrent_report_deleted_by", strconv.Itoa(int(report.ID)), router.GetUser(c).Username)
|
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")
|
c.Redirect(http.StatusSeeOther, "/mod/reports?deleted")
|
||||||
}
|
}
|
||||||
|
|
Référencer dans un nouveau ticket