Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
Web_system_team5
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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
박 병하
Web_system_team5
Commits
14cb911b
Commit
14cb911b
authored
1 year ago
by
wjdals Lee
Browse files
Options
Downloads
Patches
Plain Diff
reset
parent
f0499c35
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
backend/src/controllers/authController.js
+2
-17
2 additions, 17 deletions
backend/src/controllers/authController.js
with
2 additions
and
17 deletions
backend/src/controllers/authController.js
+
2
−
17
View file @
14cb911b
...
...
@@ -28,25 +28,10 @@ exports.login = async (req, res) => {
};
exports
.
logout
=
(
req
,
res
)
=>
{
if
(
req
.
session
.
user
)
{
// 세션 삭제
req
.
session
.
destroy
((
err
)
=>
{
if
(
err
)
{
// 세션 삭제 중 오류 발생
return
res
.
status
(
500
).
send
({
message
:
"
Logout error
"
});
}
// 세션 삭제 성공
res
.
clearCookie
(
"
connect.sid
"
);
// 세션 쿠키 삭제 (세션 쿠키 이름은 설정에 따라 다를 수 있음)
res
.
status
(
200
).
send
({
message
:
"
Successfully logged out
"
});
});
}
else
{
// 이미 로그아웃 상태
res
.
status
(
200
).
send
({
message
:
"
Already logged out
"
});
}
console
.
log
(
"
Logout requested
"
);
return
"
Logged out successfully
"
;
};
exports
.
sendEmail
=
async
(
req
,
res
)
=>
{
try
{
const
userEmail
=
req
.
params
.
email
;
...
...
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