diff --git a/router/modpanel.go b/router/modpanel.go
index 9671a760..ee059788 100644
--- a/router/modpanel.go
+++ b/router/modpanel.go
@@ -62,10 +62,11 @@ func UsersListPanel(w http.ResponseWriter, r *http.Request) {
page, _ := strconv.Atoi(r.URL.Query().Get("p"))
offset := 100
- users := userService.RetrieveUsersForAdmin(page*offset, offset)
+ users := userService.RetrieveUsersForAdmin(offset, page*offset)
languages.SetTranslationFromRequest(panelUserList, r, "en-us")
htv := PanelUserListVbs{users}
- _ = panelUserList.ExecuteTemplate(w, "admin_index.html", htv)
+ err := panelUserList.ExecuteTemplate(w, "admin_index.html", htv)
+ fmt.Println(err)
}
}
func CommentsListPanel(w http.ResponseWriter, r *http.Request) {
@@ -74,10 +75,11 @@ func CommentsListPanel(w http.ResponseWriter, r *http.Request) {
page, _ := strconv.Atoi(r.URL.Query().Get("p"))
offset := 100
- comments := commentService.GetAllComments(page*offset, offset)
+ comments := commentService.GetAllComments(offset, page * offset)
languages.SetTranslationFromRequest(panelCommentList, r, "en-us")
htv := PanelCommentListVbs{comments}
- _ = panelCommentList.ExecuteTemplate(w, "admin_index.html", htv)
+ err := panelCommentList.ExecuteTemplate(w, "admin_index.html", htv)
+ fmt.Println(err)
}
}
@@ -88,7 +90,8 @@ func TorrentEditModPanel(w http.ResponseWriter, r *http.Request) {
torrent, _ := torrentService.GetTorrentById(id)
languages.SetTranslationFromRequest(panelTorrentEd, r, "en-us")
htv := PanelTorrentEdVbs{torrent}
- _ = panelTorrentEd.ExecuteTemplate(w, "admin_index.html", htv)
+ err := panelTorrentEd.ExecuteTemplate(w, "admin_index.html", htv)
+ fmt.Println(err)
}
}
diff --git a/router/router.go b/router/router.go
index 604ee487..0774e0d5 100644
--- a/router/router.go
+++ b/router/router.go
@@ -85,6 +85,8 @@ func init() {
Router.Handle("/mod/torrents", gzipTorrentsListPanel).Name("mod_tlist")
Router.Handle("/mod/users", gzipUsersListPanel).Name("mod_ulist")
Router.Handle("/mod/comments", gzipCommentsListPanel).Name("mod_clist")
+ Router.Handle("/mod/comments", gzipCommentsListPanel).Name("mod_cedit")
+ Router.Handle("/mod/comments", gzipCommentsListPanel).Name("mod_cdelete")
Router.Handle("/mod/torrent/", gzipTorrentEditModPanel).Name("mod_tedit")
Router.Handle("/mod/torrent/", gzipTorrentPostEditModPanel).Name("mod_ptedit")
Router.Handle("/mod/torrent/delete", gzipCommentDeleteModPanel).Name("mod_tdelete")
diff --git a/templates/admin/commentlist.html b/templates/admin/commentlist.html
index 15391d6e..c6827730 100644
--- a/templates/admin/commentlist.html
+++ b/templates/admin/commentlist.html
@@ -2,7 +2,7 @@
-{{end}}
\ No newline at end of file
+{{end}}
diff --git a/templates/admin/userlist.html b/templates/admin/userlist.html
index 59e096e0..5f473ba9 100644
--- a/templates/admin/userlist.html
+++ b/templates/admin/userlist.html
@@ -2,7 +2,7 @@
-{{end}}
\ No newline at end of file
+{{end}}