Преглед на файлове

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,