Skip to content

Commit

Permalink
Fix fix/socket
Browse files Browse the repository at this point in the history
  • Loading branch information
glen15 committed Nov 8, 2021
1 parent 3378b6c commit e8fc96e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/index.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@ const io = new Server(server, {
});

io.on("connection", (socket) => {
socket.on("join", (data) => {
socket.on("join", async (data) => {
const { roomId } = data;
socket.join(roomId);
await db.Chattings.create({
content: "1",
});
});

socket.on("sendDocData", async (data) => {
Expand Down

0 comments on commit e8fc96e

Please sign in to comment.