Toggle navigation
Toggle navigation
This project
Loading...
Sign in
구희연
/
Food_recipe_info
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
Heeyeon
2021-12-04 22:56:16 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
da4e68fd45c1ece9d3ccefda75247e82b5c32040
da4e68fd
1 parent
b333335d
Fixing bugs
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
6 deletions
index.js
sessions/Y0CUohTsYhx2fRI2QlUTqW2qy5pxBnad.json
index.js
View file @
da4e68f
...
...
@@ -114,7 +114,10 @@ app.get('/logout',(req,res)=>{
//로그인 로그아웃 여부
const
authInfo
=
(
req
)
=>
{
if
(
req
.
user
)
return
`
${
user
.
name
}
| <a href="/logout">로그아웃</a>`
;
if
(
req
.
user
)
{
return
`
${
user
.
name
}
| <a href="/logout">로그아웃</a>`
;}
else
return
`<a href="/login">로그인</a>`
;
}
...
...
@@ -154,11 +157,30 @@ function (accessToken, refreshToken, profile, done) {
/*--------------------회원가입 처리---------------------- */
//회원가입 처리 Post
var
user
=
{};
app
.
post
(
'/join'
,(
req
,
res
)
=>
{
user
.
email
=
req
.
body
.
email
;
user
.
password
=
req
.
body
.
password
;
user
.
name
=
req
.
body
.
name
;
//로그인 페이지로 이동
console
.
log
(
user
);
res
.
redirect
(
'/login'
);
});
//회원가입 페이지 Get
app
.
get
(
'/join'
,(
req
,
res
)
=>
{
let
page
=
getPage
(
'회원가입'
,
`
<html>
<head>
<script> function congratulation()
{
alert("새로운 회원이 되신걸 축하합니다!:D \n 레시피 찾을 준비 되셨나요?");
} </script>
<style>
body {
padding-top: 15px;
...
...
@@ -208,10 +230,7 @@ app.get('/join',(req,res)=>{
</style><link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<script> function congratulation()
{
alert("새로운 회원이 되신걸 축하합니다!:D \n 레시피 찾을 준비 되셨나요?");
} </script>
</head>
<body>
...
...
@@ -235,6 +254,7 @@ app.get('/join',(req,res)=>{
</button>
</form>
</html>
`
,
'<a href="/login">뒤로가기</a>'
);
res
.
send
(
page
);
});
...
...
sessions/Y0CUohTsYhx2fRI2QlUTqW2qy5pxBnad.json
deleted
100644 → 0
View file @
b333335
{
"cookie"
:{
"originalMaxAge"
:
null
,
"expires"
:
null
,
"httpOnly"
:
true
,
"path"
:
"/"
},
"flash"
:{
"error"
:[
"Missing username or password."
]},
"__lastAccess"
:
1638446277022
}
\ No newline at end of file
Please
register
or
login
to post a comment