Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
WebBack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
websystem
WebBack
Merge requests
!25
[
#17
] 채팅 푸시알림 추가
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
[
#17
] 채팅 푸시알림 추가
feature/#12
into
develop
Overview
0
Commits
7
Pipelines
0
Changes
1
Merged
심재엽
requested to merge
feature/#12
into
develop
5 months ago
Overview
0
Commits
7
Pipelines
0
Changes
1
Expand
0
0
Merge request reports
Viewing commit
acaba97c
Prev
Next
Show latest version
1 file
+
4
−
15
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
acaba97c
refactor: 채팅방 생성 로직 합침
· acaba97c
심재엽
authored
5 months ago
controllers/chatController.js
+
4
−
15
Options
const
chatService
=
require
(
'
../services/chatService
'
);
// 내부용 채팅방 생성
exports
.
createChatRoomInternal
=
async
(
params
)
=>
{
exports
.
createChatRoom
=
async
(
params
)
=>
{
try
{
return
await
chatService
.
createChatRoom
(
params
);
const
chatRoomId
=
await
chatService
.
createChatRoom
(
params
);
res
.
json
(
chatRoomId
);
}
catch
(
err
)
{
console
.
error
(
'
Error in createChatRoomInternal:
'
,
err
);
return
{
success
:
false
,
error
:
err
.
message
};
}
};
// 새 채팅방 생성
exports
.
createChatRoom
=
async
(
req
,
res
)
=>
{
try
{
const
chatRoomId
=
await
chatService
.
createChatRoom
();
res
.
json
({
chatRoomId
});
}
catch
(
err
)
{
console
.
error
(
'
Error creating room:
'
,
err
);
console
.
error
(
'
Error in createChatRoom:
'
,
err
);
res
.
status
(
500
).
json
({
error
:
'
Failed to create room
'
});
}
};
Loading