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
Commits
a43ecfbb
Commit
a43ecfbb
authored
3 months ago
by
세현 임
Browse files
Options
Downloads
Patches
Plain Diff
bugfix: 미팅서비스 컨트롤러 오류수정
parent
f4be162b
No related branches found
Branches containing commit
No related tags found
1 merge request
!43
배포코드 master브랜치로
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
controllers/meetingController.js
+2
-1
2 additions, 1 deletion
controllers/meetingController.js
models/index.js
+2
-2
2 additions, 2 deletions
models/index.js
push.sh
+49
-0
49 additions, 0 deletions
push.sh
pushlog.log
+1028
-0
1028 additions, 0 deletions
pushlog.log
sync.js
+2
-2
2 additions, 2 deletions
sync.js
with
1083 additions
and
5 deletions
controllers/meetingController.js
+
2
−
1
View file @
a43ecfbb
...
...
@@ -108,8 +108,9 @@ class MeetingController {
*/
async
getMeetingDetail
(
req
,
res
)
{
const
{
meetingId
}
=
req
.
params
;
const
userId
=
req
.
user
.
id
;
try
{
const
meetingDetail
=
await
MeetingService
.
getMeetingDetail
(
meetingId
);
const
meetingDetail
=
await
MeetingService
.
getMeetingDetail
(
meetingId
,
userId
);
res
.
status
(
200
).
json
(
meetingDetail
);
}
catch
(
err
)
{
console
.
error
(
'
모임 상세 조회 오류:
'
,
err
);
...
...
This diff is collapsed.
Click to expand it.
models/index.js
+
2
−
2
View file @
a43ecfbb
...
...
@@ -111,13 +111,13 @@ Meeting.hasMany(Invite, {
onDelete
:
'
CASCADE
'
,
});
FcmToken
.
belongsTo
(
User
,{
foreign
k
ey
:
'
userId
'
,
foreign
K
ey
:
'
userId
'
,
as
:
'
user
'
,
onDelete
:
'
CASCADE
'
,
});
User
.
hasMany
(
FcmToken
,
{
foreign
k
ey
:
'
userId
'
,
foreign
K
ey
:
'
userId
'
,
as
:
'
fcmTokenList
'
,
onDelete
:
'
CASCADE
'
,
});
...
...
This diff is collapsed.
Click to expand it.
push.sh
0 → 100755
+
49
−
0
View file @
a43ecfbb
#!/bin/bash
# Define application file names
APP_JS
=
"app.js"
WS_SERVER_JS
=
"wsServer.js"
PUSH_SERVER_JS
=
"pushServer.js"
# New server file
# Find and kill processes for app.js
APP_PID
=
$(
pgrep
-f
"node .*
${
APP_JS
}
"
)
if
[
-n
"
$APP_PID
"
]
;
then
echo
"Stopping
${
APP_JS
}
with PID:
$APP_PID
"
kill
-9
"
$APP_PID
"
else
echo
"No running process found for
${
APP_JS
}
"
fi
# Find and kill processes for wsServer.js
WS_SERVER_PID
=
$(
pgrep
-f
"node .*
${
WS_SERVER_JS
}
"
)
if
[
-n
"
$WS_SERVER_PID
"
]
;
then
echo
"Stopping
${
WS_SERVER_JS
}
with PID:
$WS_SERVER_PID
"
kill
-9
"
$WS_SERVER_PID
"
else
echo
"No running process found for
${
WS_SERVER_JS
}
"
fi
# Find and kill processes for pushServer.js
PUSH_SERVER_PID
=
$(
pgrep
-f
"node .*
${
PUSH_SERVER_JS
}
"
)
if
[
-n
"
$PUSH_SERVER_PID
"
]
;
then
echo
"Stopping
${
PUSH_SERVER_JS
}
with PID:
$PUSH_SERVER_PID
"
kill
-9
"
$PUSH_SERVER_PID
"
else
echo
"No running process found for
${
PUSH_SERVER_JS
}
"
fi
# Start app.js with nohup
echo
"Starting
${
APP_JS
}
..."
nohup
node
"
${
APP_JS
}
"
>
output.log 2>&1 &
echo
"
${
APP_JS
}
started with PID:
$!
"
# Start wsServer.js with nohup
echo
"Starting
${
WS_SERVER_JS
}
..."
nohup
node
"
${
WS_SERVER_JS
}
"
>
weblog.log 2>&1 &
echo
"
${
WS_SERVER_JS
}
started with PID:
$!
"
# Start pushServer.js with nohup
echo
"Starting
${
PUSH_SERVER_JS
}
..."
nohup
node
"
${
PUSH_SERVER_JS
}
"
>
pushlog.log 2>&1 &
echo
"
${
PUSH_SERVER_JS
}
started with PID:
$!
"
This diff is collapsed.
Click to expand it.
pushlog.log
0 → 100644
+
1028
−
0
View file @
a43ecfbb
This diff is collapsed.
Click to expand it.
sync.js
+
2
−
2
View file @
a43ecfbb
...
...
@@ -9,7 +9,7 @@ async function syncRdb() {
await
sequelize
.
authenticate
();
console
.
log
(
'
Rdb 데이터베이스 연결 성공.
'
);
await
sequelize
.
sync
();
await
sequelize
.
sync
(
{
alter
:
true
}
);
console
.
log
(
'
모든 모델이 성공적으로 동기화됨.
'
);
}
catch
(
error
)
{
console
.
error
(
'
Rdb 데이터베이스 연결 실패:
'
,
error
);
...
...
@@ -18,4 +18,4 @@ async function syncRdb() {
module
.
exports
=
syncRdb
;
\ No newline at end of file
module
.
exports
=
syncRdb
;
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment