refactor: always returns array

isekai-main
Barış Soner Uşaklı 3 years ago
parent 830166d120
commit 9627fa9029

@ -109,7 +109,6 @@ module.exports = function (User) {
}
User.getPostIds = async function (uid, start, stop) {
const pids = await db.getSortedSetRevRange(`uid:${uid}:posts`, start, stop);
return Array.isArray(pids) ? pids : [];
return await db.getSortedSetRevRange(`uid:${uid}:posts`, start, stop);
};
};

Loading…
Cancel
Save