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
|
||||
|
||||
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")
|
||||
}
|
||||
|
|
Référencer dans un nouveau ticket