feat: Implement connected user API and integrate chat and report components

- Added API routes for fetching connected users, keywords, missions, and stations.
- Created a new QueryProvider component for managing query states and socket events.
- Introduced connection stores for dispatch and pilot, managing socket connections and states.
- Updated Prisma schema for connected aircraft model.
- Enhanced UI with toast notifications for status updates and chat interactions.
- Implemented query functions for fetching connected users and keywords with error handling.
This commit is contained in:
PxlLoewe
2025-05-07 00:43:45 -07:00
parent 152b3d4689
commit 50f42e99d3
49 changed files with 1040 additions and 701 deletions

View File

@@ -9,11 +9,12 @@ import { handleConnectDispatch } from "socket-events/connect-dispatch";
import router from "routes/router";
import cors from "cors";
import { handleSendMessage } from "socket-events/send-message";
import { handleConnectPilot } from "socket-events/connect-pilot";
const app = express();
const server = createServer(app);
const io = new Server(server, {
export const io = new Server(server, {
adapter: createAdapter(pubClient, subClient),
cors: {},
});
@@ -21,6 +22,7 @@ io.use(jwtMiddleware);
io.on("connection", (socket) => {
socket.on("connect-dispatch", handleConnectDispatch(socket, io));
socket.on("connect-pilot", handleConnectPilot(socket, io));
socket.on("send-message", handleSendMessage(socket, io));
});