Commit 4178bed0 authored by 우지원's avatar 우지원
Browse files

방퇴장 수정

parent 5fb56d3d
......@@ -124,7 +124,9 @@ const exitRoom = async (req, res) => {
);
const user = await User.findOne({ where: { id: id } });
const index2 = user.roomNumber.indexOf(id);
console.log('user',user, user.roomNumber)
const index2 = user.roomNumber.indexOf(roomId);
console.log('제발제발',index2, roomId, user.roomNumber)
user.roomNumber.splice(index2, 1);
const newUser = await User.update(
{ roomNumber: user.roomNumber },
......
......@@ -20,7 +20,7 @@ sequelize
email: "admin",
password: "admin!",
gender: 0,
roomNumber : ["1234567abc","abc7654321"],
roomNumber : [],
});
// await Room.create({
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment