Skip to content
Snippets Groups Projects
Commit 3a5e03ab authored by Wo-ogie's avatar Wo-ogie
Browse files

fix: 약속 입장 시 cookie가 존재하지 않을 때에도 삭제하려고 하는 로직 수정

parent a543f673
Branches
No related tags found
No related merge requests found
...@@ -70,7 +70,9 @@ function setParticipantDataToCookie(req, res, participant) { ...@@ -70,7 +70,9 @@ function setParticipantDataToCookie(req, res, participant) {
httpOnly: true, httpOnly: true,
signed: true, signed: true,
}; };
const existCookie = req.signedCookies.participantData;
const existCookie = req.signedCookies.participantData || null;
if (existCookie) {
res.clearCookie( res.clearCookie(
cookieName, cookieName,
JSON.stringify({ JSON.stringify({
...@@ -79,6 +81,8 @@ function setParticipantDataToCookie(req, res, participant) { ...@@ -79,6 +81,8 @@ function setParticipantDataToCookie(req, res, participant) {
}), }),
cookieOptions, cookieOptions,
); );
}
res.cookie( res.cookie(
cookieName, cookieName,
JSON.stringify({ JSON.stringify({
...@@ -121,6 +125,7 @@ exports.entry = async (req, res, next) => { ...@@ -121,6 +125,7 @@ exports.entry = async (req, res, next) => {
MeetingId: meetingIdToEntry, MeetingId: meetingIdToEntry,
}, },
}); });
console.log('participant', participant);
if (!participant) { if (!participant) {
const passwordEncrypted = await encryptPassword(passwordToEntry, next); const passwordEncrypted = await encryptPassword(passwordToEntry, next);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment