ENCOA-314 :
- Implemented Async Select - Changed Stats Page User fetching to use Async Select and only fetch the User data when it needs - Changed Record Filter to use Async Select - Changed useTicketListener to only fetch needed data - Added Sort/Projection to remove unnecessary data processing. - Removed some unnecessary data processing.
This commit is contained in:
@@ -26,7 +26,7 @@ async function get(req: NextApiRequest, res: NextApiResponse) {
|
||||
const q = user ? { user: user } : {};
|
||||
const sessions = await db.collection("sessions").find<Session>({
|
||||
...q,
|
||||
}).limit(12).toArray();
|
||||
}).limit(12).sort({ date: -1 }).toArray();
|
||||
console.log(sessions)
|
||||
|
||||
res.status(200).json(
|
||||
|
||||
Reference in New Issue
Block a user