Przeglądaj źródła

Change query for category from name field to value field

sbkwgh 8 lat temu
rodzic
commit
57f6b6211c
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      routes/category.js

+ 1 - 1
routes/category.js

@@ -61,7 +61,7 @@ router.get('/:category', async (req, res) => {
 			threadsLatestPost = await Thread.findAll( threadInclude('DESC')[0] )
 		} else {
 			threads = await Category.findOne({
-				where: { name: req.params.category },
+				where: { value: req.params.category },
 				include: threadInclude('ASC')
 			})