Procházet zdrojové kódy

Remove superfluous async/await keywords

sbkwgh před 8 roky
rodič
revize
81dce1a6e7
2 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 1 1
      models/thread.js
  2. 1 1
      routes/thread.js

+ 1 - 1
models/thread.js

@@ -35,7 +35,7 @@ module.exports = (sequelize, DataTypes) => {
 		}
 	}, {
 		instanceMethods: {
-			async getMeta (limit) {
+			getMeta (limit) {
 				let meta = {}
 
 				let posts = this.Posts

+ 1 - 1
routes/thread.js

@@ -13,7 +13,7 @@ router.get('/:thread_id', async (req, res) => {
 		}) 
 		if(!thread) throw Errors.invalidParameter('id', 'thread does not exist')
 		
-		let meta = await thread.getMeta(limit)
+		let meta = thread.getMeta(limit)
 
 		res.json(Object.assign( thread.toJSON(), { meta } ))