improvement: remove ifinite scroll lib

This commit is contained in:
canove
2020-08-08 17:35:42 -03:00
parent e0993dc238
commit c3d262648d
5 changed files with 45 additions and 32 deletions

View File

@@ -73,6 +73,8 @@ exports.index = async (req, res, next) => {
order: [["createdAt", "DESC"]],
});
const count = await ticket.countMessages();
const serializedMessages = ticketMessages.map(message => {
return {
...message.dataValues,
@@ -86,7 +88,8 @@ exports.index = async (req, res, next) => {
return res.json({
messages: serializedMessages.reverse(),
ticket: ticket,
ticket,
count,
});
};