瀏覽代碼

Fix bug where non-existent variable was being accessed leading to an error being thrown; fix by accessing this.username property

sbkwgh 7 年之前
父節點
當前提交
e95af412bc
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      models/user.js

+ 1 - 1
models/user.js

@@ -109,7 +109,7 @@ module.exports = (sequelize, DataTypes) => {
 					meta.nextPostsCount = 0
 				} else {
 					meta.nextURL =
-						`/api/v1/user/${user.username}?posts=true&limit=${limit}&from=${nextId - 1}`
+						`/api/v1/user/${this.username}?posts=true&limit=${limit}&from=${nextId - 1}`
 
 					meta.nextPostsCount = await pagination.getNextCount(
 						Post, this.Posts, limit,