Skip to content

Commit

Permalink
Merge pull request #26 from glen15/fix/socket
Browse files Browse the repository at this point in the history
Fix fix/socket
  • Loading branch information
glen15 authored Nov 8, 2021
2 parents 81c60d3 + e8fc96e commit 1805542
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 1805542

Please sign in to comment.