Toggle navigation
Toggle navigation
This project
Loading...
Sign in
진성욱
/
OSS
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
swjin
2019-11-08 09:22:32 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c37d9d67b3ff689d88c76ae955c70be5c26e18de
c37d9d67
1 parent
792014ea
Comment added
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
Experiments/experiments09/assignments/assignment02/app.js
Experiments/experiments09/assignments/assignment02/app.js
View file @
c37d9d6
...
...
@@ -13,6 +13,8 @@ var userId = 'test';
var
userPass
=
'1234'
;
app
.
get
(
'/login/:userId/password/:password'
,
function
(
req
,
res
)
{
// users 배열에서 찾도록 수정해야 함
// admin 여부를 지원할 수 있도록 수정해야 함
if
(
req
.
params
.
userId
==
userId
&&
req
.
params
.
password
==
userPass
)
{
req
.
session
.
userId
=
userId
;
}
...
...
@@ -38,4 +40,7 @@ app.get('/user/:userId', auth,function (req, res) {
// get User Information
res
.
send
(
"OK"
);
});
// 사용자 추가 시에 admin 여부도 추가해야 함
var
server
=
app
.
listen
(
80
);
...
...
Please
register
or
login
to post a comment