Skip to content
Snippets Groups Projects
Commit a43ecfbb authored by 세현 임's avatar 세현 임
Browse files

bugfix: 미팅서비스 컨트롤러 오류수정

parent f4be162b
No related branches found
No related tags found
1 merge request!43배포코드 master브랜치로
......@@ -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);
......
......@@ -111,13 +111,13 @@ Meeting.hasMany(Invite, {
onDelete: 'CASCADE',
});
FcmToken.belongsTo(User,{
foreignkey:'userId',
foreignKey:'userId',
as:'user',
onDelete:'CASCADE',
});
User.hasMany(FcmToken,
{
foreignkey:'userId',
foreignKey:'userId',
as:'fcmTokenList',
onDelete:'CASCADE',
});
......
push.sh 0 → 100755
#!/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: $!"
pushlog.log 0 → 100644
This diff is collapsed.
......@@ -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;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment