Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
students
bora-it
Commits
fecf0818
Commit
fecf0818
authored
Aug 09, 2021
by
이재연
Browse files
aa
parent
ef4c3577
Changes
1
Show whitespace changes
Inline
Side-by-side
server/controllers/room.controller.js
View file @
fecf0818
...
@@ -137,6 +137,7 @@ const joinChannel = async (req, res) => {
...
@@ -137,6 +137,7 @@ const joinChannel = async (req, res) => {
const
room
=
await
Room
.
findOne
({
where
:
{
id
:
roomId
}
});
const
room
=
await
Room
.
findOne
({
where
:
{
id
:
roomId
}
});
room
.
channel
[
index
][
channelName
].
push
(
plusUser
);
room
.
channel
[
index
][
channelName
].
push
(
plusUser
);
await
Room
.
update
({
channel
:
room
.
channel
},
{
where
:
{
id
:
roomId
}
});
await
Room
.
update
({
channel
:
room
.
channel
},
{
where
:
{
id
:
roomId
}
});
return
res
.
json
(
true
)
}
catch
(
error
)
{
}
catch
(
error
)
{
res
.
status
(
500
).
send
(
"
error
"
);
res
.
status
(
500
).
send
(
"
error
"
);
}
}
...
@@ -148,6 +149,7 @@ const doubleJoin = async (req, res) => {
...
@@ -148,6 +149,7 @@ const doubleJoin = async (req, res) => {
const
room
=
await
Room
.
findOne
({
where
:
{
id
:
roomId
}
});
const
room
=
await
Room
.
findOne
({
where
:
{
id
:
roomId
}
});
room
.
channel
[
index1
][
joinChName
].
splice
(
index2
,
1
);
room
.
channel
[
index1
][
joinChName
].
splice
(
index2
,
1
);
await
Room
.
update
({
channel
:
room
.
channel
},
{
where
:
{
id
:
roomId
}
});
await
Room
.
update
({
channel
:
room
.
channel
},
{
where
:
{
id
:
roomId
}
});
return
res
.
json
(
true
)
}
catch
(
error
)
{
}
catch
(
error
)
{
res
.
status
(
500
).
send
(
"
error
"
);
res
.
status
(
500
).
send
(
"
error
"
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment