Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
students
Today KU
Commits
fe46675e
Commit
fe46675e
authored
Nov 12, 2021
by
Kim, Subin
Browse files
console.log 삭제
parent
f3271b71
Changes
5
Show whitespace changes
Inline
Side-by-side
client/src/components/Form/LoginForm.js
View file @
fe46675e
...
@@ -30,7 +30,6 @@ const LoginForm = () => {
...
@@ -30,7 +30,6 @@ const LoginForm = () => {
})}
})}
onSubmit
=
{
async
(
values
,
{
setSubmitting
,
resetForm
})
=>
{
onSubmit
=
{
async
(
values
,
{
setSubmitting
,
resetForm
})
=>
{
try
{
try
{
console
.
log
(
'
login values
'
,
values
)
setError
(
""
)
setError
(
""
)
const
result
=
await
login
(
values
)
const
result
=
await
login
(
values
)
if
(
result
)
{
if
(
result
)
{
...
...
client/src/components/Form/SignupForm.js
View file @
fe46675e
...
@@ -49,7 +49,6 @@ const SignupForm = () => {
...
@@ -49,7 +49,6 @@ const SignupForm = () => {
try
{
try
{
setError
(
""
)
setError
(
""
)
const
result
=
await
authApi
.
signup
(
values
)
const
result
=
await
authApi
.
signup
(
values
)
// console.log('회원가입 요청 후 result 확인', result, '|', result.status)
if
(
result
.
status
===
201
)
{
if
(
result
.
status
===
201
)
{
alert
(
"
회원가입이 완료되었습니다.
"
)
alert
(
"
회원가입이 완료되었습니다.
"
)
setSuccess
(
true
)
setSuccess
(
true
)
...
...
client/src/components/Form/StudyPlanEditForm.js
View file @
fe46675e
...
@@ -106,7 +106,6 @@ const StudyPlanEditForm = () => {
...
@@ -106,7 +106,6 @@ const StudyPlanEditForm = () => {
return
(
return
(
<
div
className
=
"
pt-5
"
>
<
div
className
=
"
pt-5
"
>
{
console
.
log
(
"
studyplan---
"
,
studyplan
)}
<
select
className
=
{
`form-select mb-4
${
styles
.
selectInput
}
`
}
name
=
"
selected
"
aria
-
label
=
"
Choose subject
"
onChange
=
{
handleChange
}
>
<
select
className
=
{
`form-select mb-4
${
styles
.
selectInput
}
`
}
name
=
"
selected
"
aria
-
label
=
"
Choose subject
"
onChange
=
{
handleChange
}
>
{
subjectList
.
length
!==
0
?
subjectList
.
map
((
subject
,
idx
)
=>
{
{
subjectList
.
length
!==
0
?
subjectList
.
map
((
subject
,
idx
)
=>
{
if
(
idx
===
0
)
return
<>
if
(
idx
===
0
)
return
<>
...
...
client/src/utils/context.js
View file @
fe46675e
...
@@ -20,7 +20,6 @@ const AuthProvider = ({ children }) => {
...
@@ -20,7 +20,6 @@ const AuthProvider = ({ children }) => {
const
{
pathname
}
=
useLocation
()
const
{
pathname
}
=
useLocation
()
const
getUser
=
async
()
=>
{
const
getUser
=
async
()
=>
{
try
{
try
{
console
.
log
(
"
context getUser
"
)
const
resUser
=
await
authApi
.
getUser
();
const
resUser
=
await
authApi
.
getUser
();
setUser
({
...
user
,
...
resUser
})
setUser
({
...
user
,
...
resUser
})
if
(
resUser
.
role
===
"
admin
"
)
history
.
push
(
"
/admin
"
)
if
(
resUser
.
role
===
"
admin
"
)
history
.
push
(
"
/admin
"
)
...
...
server/controllers/user.controller.js
View file @
fe46675e
...
@@ -17,7 +17,6 @@ const getUser = async (req, res) => {
...
@@ -17,7 +17,6 @@ const getUser = async (req, res) => {
}
}
const
signup
=
async
(
req
,
res
)
=>
{
const
signup
=
async
(
req
,
res
)
=>
{
console
.
log
(
'
server/signup req.body
'
,
req
.
body
)
const
{
userId
,
password
,
userName
,
userStudNum
}
=
req
.
body
;
const
{
userId
,
password
,
userName
,
userStudNum
}
=
req
.
body
;
try
{
try
{
const
findId
=
await
User
.
findOne
({
where
:
{
userID
:
userId
}
});
const
findId
=
await
User
.
findOne
({
where
:
{
userID
:
userId
}
});
...
@@ -39,7 +38,6 @@ const signup = async (req, res) => {
...
@@ -39,7 +38,6 @@ const signup = async (req, res) => {
}
}
const
login
=
async
(
req
,
res
)
=>
{
const
login
=
async
(
req
,
res
)
=>
{
console
.
log
(
'
server/login req.body
'
,
req
.
body
)
const
{
userId
,
password
}
=
req
.
body
;
const
{
userId
,
password
}
=
req
.
body
;
try
{
try
{
const
user
=
await
User
.
scope
(
"
withPassword
"
).
findOne
({
where
:
{
userID
:
userId
}
});
const
user
=
await
User
.
scope
(
"
withPassword
"
).
findOne
({
where
:
{
userID
:
userId
}
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment