Explorar o código

Change query for category from name field to value field

sbkwgh %!s(int64=8) %!d(string=hai) anos
pai
achega
57f6b6211c
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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')
 			})