Skip to content

armgit / fider

Public Imported from GitHub
0

Open platform to collect and prioritize feedback

Don't serve stuff for non-commercial users

Matt Roberts8c73978399e2
diff --git a/app/handlers/moderation.go b/app/handlers/moderation.go
index 841a8384f..2dd2ea7b3 100644
--- a/app/handlers/moderation.go
+++ b/app/handlers/moderation.go
@@ -1,33 +1,28 @@
package handlers
import (
- "net/http"
-
+ "github.com/getfider/fider/app"
"github.com/getfider/fider/app/pkg/web"
)
// ModerationPage is the moderation administration page (stub - requires commercial license)
func ModerationPage() web.HandlerFunc {
return func(c *web.Context) error {
- return c.Page(http.StatusOK, web.Props{
- Page: "Administration/pages/ContentModeration.page",
- Title: "Moderation · Site Settings",
- })
+ return c.Failure(app.ErrCommercialLicenseRequired)
}
}
// GetModerationItems returns all unmoderated posts and comments (stub - requires commercial license)
func GetModerationItems() web.HandlerFunc {
return func(c *web.Context) error {
- return c.Ok(web.Map{
- "items": []interface{}{},
- })
+ return c.Failure(app.ErrCommercialLicenseRequired)
}
}
// GetModerationCount returns the count of items awaiting moderation (stub - requires commercial license)
func GetModerationCount() web.HandlerFunc {
return func(c *web.Context) error {
+ // Return 0 instead of error to allow UI to function normally
return c.Ok(web.Map{
"count": 0,
})