fix: #10010, handle reverse sorting for topic events

dont add events to dom if sort is most votes
if sorting is reverse add new events after the main post or at the top instead of bottom
This commit is contained in:
Barış Soner Uşaklı
2021-11-17 23:34:01 -05:00
parent e368feef51
commit d5bfd51267
6 changed files with 43 additions and 16 deletions

View File

@@ -209,7 +209,7 @@ Topics.getEvents = async (req, res) => {
return helpers.formatApiResponse(403, res);
}
helpers.formatApiResponse(200, res, await topics.events.get(req.params.tid));
helpers.formatApiResponse(200, res, await topics.events.get(req.params.tid, req.uid));
};
Topics.deleteEvent = async (req, res) => {