Skip to main content

Hide / Unhide Category

If you hide a category:

If the user is not logged in:

  • it is hidden in the sidebar
  • they cannot access any threads in the category, and their comments (can check if the thread exists though)

Default Hidden Categories

By default, category 8 (Adult) is hidden.

Hide / Unhide

Log in to mongodb

mongosh mongodb://<username>:<password>@localhost:30000/metahkg

List the categories

db.category.find().pretty()

Find the id of the one you want to hide / unhide. If the object has hidden: true, it is hidden. Otherwise, it is not.

Hide

Warning

DO NOT hide category 1, or the output might not be as expected!

db.category.updateOne({ id: <id> }, { $set: { hidden: true } })

Unhide

db.category.updateOne({ id: <id> }, { $unset: { hidden: true } })