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 21:44:23 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e654fdc8d8e484b84aa8cdc80f2e5058952f63d5
e654fdc8
1 parent
14a9c92b
update profile for admin
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletions
readme.md
router/profile/index.js
readme.md
View file @
e654fdc
...
...
@@ -60,7 +60,7 @@ create table board(
>UPDATE board SET idx = @COUNT:=@COUNT+1;
---
### 최종 수정: 2021-11-20
19:16
<br>
### 최종 수정: 2021-11-20
21:44
<br>
### 수정 내용:
1.
최근 있었던 DB명세구조 변경
>alter table board drop passwd;<br>
...
...
router/profile/index.js
View file @
e654fdc
...
...
@@ -117,6 +117,12 @@ router.post('/update', function(req,res,next){
if
(
err
)
console
.
error
(
err
)
// 변경하려는 닉네임이 중복이 아닌 경우 or 닉네임 변경이 없는 수정
if
(
!
result
.
length
||
(
result
.
length
&&
req
.
user
.
ID
==
result
[
0
].
ID
)){
// 운영자인 경우 타입을 변경시키지 않고 고정
if
(
oldType
==
'운영자'
){
type
=
'운영자'
datas
[
2
]
=
'운영자'
;
}
var
sql
=
"update userdb set profilemsg =?, nickname=?, type=? where id =?"
myinfo
.
query
(
sql
,
datas
,
function
(
err
,
result
){
if
(
err
)
console
.
error
(
err
)
...
...
Please
register
or
login
to post a comment