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
bora-it
Commits
bfb6e4f6
Commit
bfb6e4f6
authored
Jul 28, 2021
by
이재연
Browse files
오류수정엉
parent
06243807
Changes
10
Show whitespace changes
Inline
Side-by-side
client/package.json
View file @
bfb6e4f6
...
...
@@ -24,8 +24,12 @@
"test"
:
"react-scripts test"
,
"eject"
:
"react-scripts eject"
},
"nodemonConfig"
:{
"ignore"
:[
"test/*"
,
"docs/*"
,
"client/*"
]
"nodemonConfig"
:
{
"ignore"
:
[
"test/*"
,
"docs/*"
,
"client/*"
]
},
"eslintConfig"
:
{
"extends"
:
[
...
...
client/src/components/Home/HomeProfile.js
View file @
bfb6e4f6
...
...
@@ -16,7 +16,7 @@ const HomeProfile = () => {
async
function
getSetUser
(
userID
)
{
try
{
// console.log('userID', userID)
const
data
=
await
userApi
.
getUser
(
userID
)
const
data
=
await
userApi
.
getUser
(
userID
)
// console.log(data)
setUser
(
data
)
// console.log(user)
...
...
client/src/components/Profile/Info.js
View file @
bfb6e4f6
...
...
@@ -14,7 +14,7 @@ const Info = () => {
async
function
getProfile
(
userID
)
{
try
{
const
data
=
await
userApi
.
getUser
(
{
id
:
userID
}
);
const
data
=
await
userApi
.
getUser
(
userID
);
setProfile
(
data
);
}
catch
(
error
)
{}
}
...
...
client/src/components/Profile/InfoUpdate.js
View file @
bfb6e4f6
...
...
@@ -19,7 +19,7 @@ const InfoUpdate = () => {
async
function
getProfile
(
userID
)
{
try
{
const
data
=
await
userApi
.
getUser
(
{
id
:
userID
}
);
const
data
=
await
userApi
.
getUser
(
userID
);
setProfile
(
data
);
}
catch
(
error
)
{}
}
...
...
client/src/components/Profile/Profile.js
View file @
bfb6e4f6
...
...
@@ -14,7 +14,7 @@ const Profile = () => {
async
function
getProfile
(
userID
)
{
try
{
const
data
=
await
userApi
.
getUser
(
{
id
:
userID
}
);
const
data
=
await
userApi
.
getUser
(
userID
);
setProfile
(
data
.
img
)
}
catch
(
error
)
{}
...
...
controllers/user.controller.js
View file @
bfb6e4f6
...
...
@@ -23,7 +23,7 @@ const update = async (req, res) => {
}
};
const
getUser
=
async
(
req
,
res
)
=>
{
const
user
=
await
User
.
findOne
({
where
:
{
id
:
req
.
body
.
id
}
});
const
user
=
await
User
.
findOne
({
where
:
{
id
:
req
.
params
.
id
}
});
res
.
json
(
user
)
};
...
...
@@ -43,7 +43,6 @@ const updateinfo = async (req, res) => {
};
const
login
=
async
(
req
,
res
)
=>
{
try
{
// console.log('login= ', req.body)
const
{
email
,
password
}
=
req
.
body
const
user
=
await
User
.
findOne
({
where
:
{
email
:
email
}
})
if
(
!
user
)
{
...
...
@@ -65,7 +64,6 @@ const login = async (req, res) => {
}
}
}
catch
(
error
)
{
// console.log(error)
return
res
.
status
(
500
).
send
(
'
로그인 중 에러
'
)
}
};
...
...
uploads/5d5f900c1a62772280eb4d750c112295
0 → 100644
View file @
bfb6e4f6
File added
uploads/97df1664b2dac0ab73f77c20c620bbdf
0 → 100644
View file @
bfb6e4f6
File added
uploads/b84594c288a0396757a51ffdb6faa8b5
0 → 100644
View file @
bfb6e4f6
File added
uploads/dc5dde2f5a9a61e752247a63e27a2737
0 → 100644
View file @
bfb6e4f6
File added
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