Toggle navigation
Toggle navigation
This project
Loading...
Sign in
최시원
/
Singer-Composer
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Mukho
2021-11-20 03:46:31 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
3f55e8fbf2d8dc26cce38edf5298a4f6604a3975
3f55e8fb
1 parent
157bcd87
fix
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
readme.md
router/profile/index.js
readme.md
View file @
3f55e8f
...
...
@@ -55,7 +55,7 @@ SET @COUNT = 0;
UPDATE board SET idx = @COUNT:=@COUNT+1;
입력
<h2><br><br>
최종 수정: 2021-11-20 0
1:50
<br>
최종 수정: 2021-11-20 0
3:46
<br>
최종 수정 내용:
<h2>
★★필수입력★★
<h2>
alter table board drop passwd;
...
...
router/profile/index.js
View file @
3f55e8f
...
...
@@ -41,10 +41,10 @@ passport.deserializeUser(function(user, done){
router
.
get
(
'/'
,
function
(
req
,
res
){
try
{
var
id
=
req
.
session
.
passport
.
user
.
ID
;
if
(
!
id
){
console
.
log
(
logString
+
'익명 유저의 프로필 접근 시도를 거부했습니다.
'
)
res
.
redirect
(
'/login'
)
}
//
if(!id){
// console.log(logString+'익명 유저의 프로필 접근 시도를 거부했습니다.1
')
//
res.redirect('/login')
//
}
var
sql
=
"select profilemsg, type from userdb where id =?"
;
...
...
@@ -59,7 +59,7 @@ router.get('/', function(req, res){
}
catch
{
console
.
log
(
logString
+
'익명 유저의 프로필 접근 시도를 거부했습니다.'
)
res
.
redirect
(
'/login'
)
res
.
sendFile
(
path
.
join
(
__dirname
,
"../../public/login.html"
)
)
}
});
...
...
@@ -67,10 +67,10 @@ router.get('/', function(req, res){
router
.
get
(
'/update'
,
function
(
req
,
res
){
try
{
var
id
=
req
.
user
.
ID
;
if
(
!
id
){
console
.
log
(
logString
+
'익명 유저의 프로필 수정 시도를 거부했습니다.'
)
res
.
redirect
(
'/login'
)
}
//
if(!id){
//
console.log(logString+'익명 유저의 프로필 수정 시도를 거부했습니다.')
//
res.redirect('/login')
//
}
var
sql
=
'select profilemsg from userdb where id ="'
+
req
.
user
.
ID
+
'"'
;
...
...
@@ -87,7 +87,7 @@ router.get('/update', function(req,res){
catch
{
if
(
!
id
){
console
.
log
(
logString
+
'익명 유저의 프로필 수정 시도를 거부했습니다.'
)
res
.
redirect
(
'/login'
)
res
.
sendFile
(
path
.
join
(
__dirname
,
"../../public/login.html"
)
)
}
}
})
...
...
@@ -122,9 +122,9 @@ router.post('/update', function(req,res,next){
if
(
err
)
console
.
error
(
err
)
console
.
log
(
logString
+
req
.
user
.
ID
+
'('
+
req
.
session
.
passport
.
user
.
nickname
+
') 유저가 프로필을 수정했습니다.'
)
console
.
log
(
" ▷변경전: "
+
id
+
"("
+
req
.
user
.
nickname
+
") "
+
oldType
+
" // "
+
oldProfilemsg
)
console
.
log
(
" ▷
변경전: "
+
id
+
"("
+
req
.
user
.
nickname
+
") "
+
oldType
+
" // "
+
oldProfilemsg
)
req
.
session
.
passport
.
user
.
nickname
=
nickname
;
console
.
log
(
" ▶변경후: "
+
id
+
"("
+
nickname
+
") "
+
type
+
" // "
+
profilemsg
)
console
.
log
(
" ▶
변경후: "
+
id
+
"("
+
nickname
+
") "
+
type
+
" // "
+
profilemsg
)
res
.
redirect
(
'/profile'
);
})
}
...
...
Please
register
or
login
to post a comment