fixed chat zustand bug

This commit is contained in:
PxlLoewe
2025-03-21 10:27:32 -07:00
parent 71aff2d66a
commit b7eb148ca6
17 changed files with 399 additions and 91 deletions

View File

@@ -0,0 +1,21 @@
import { Router } from "express";
import { pubClient } from "modules/redis";
const router = Router();
router.get("/", async (req, res) => {
const keys = await pubClient.keys("Dispatcher:*");
const user = await Promise.all(
keys.map(async (key) => {
const data = await pubClient.json.get(key);
return {
...(typeof data === "object" && data !== null ? data : {}),
userId: key.split(":")[1],
};
}),
);
res.json(user);
});
export default router;