Commit bfb6e4f6 authored by 이재연's avatar 이재연
Browse files

오류수정엉

parent 06243807
...@@ -24,8 +24,12 @@ ...@@ -24,8 +24,12 @@
"test": "react-scripts test", "test": "react-scripts test",
"eject": "react-scripts eject" "eject": "react-scripts eject"
}, },
"nodemonConfig":{ "nodemonConfig": {
"ignore":["test/*","docs/*","client/*"] "ignore": [
"test/*",
"docs/*",
"client/*"
]
}, },
"eslintConfig": { "eslintConfig": {
"extends": [ "extends": [
......
...@@ -16,7 +16,7 @@ const HomeProfile = () => { ...@@ -16,7 +16,7 @@ const HomeProfile = () => {
async function getSetUser(userID) { async function getSetUser(userID) {
try { try {
// console.log('userID', userID) // console.log('userID', userID)
const data = await userApi.getUser( userID ) const data = await userApi.getUser(userID)
// console.log(data) // console.log(data)
setUser(data) setUser(data)
// console.log(user) // console.log(user)
......
...@@ -14,7 +14,7 @@ const Info = () => { ...@@ -14,7 +14,7 @@ const Info = () => {
async function getProfile(userID) { async function getProfile(userID) {
try { try {
const data = await userApi.getUser({id:userID}); const data = await userApi.getUser(userID);
setProfile(data); setProfile(data);
} catch (error) {} } catch (error) {}
} }
......
...@@ -19,7 +19,7 @@ const InfoUpdate = () => { ...@@ -19,7 +19,7 @@ const InfoUpdate = () => {
async function getProfile(userID) { async function getProfile(userID) {
try { try {
const data = await userApi.getUser({ id: userID }); const data = await userApi.getUser(userID);
setProfile(data); setProfile(data);
} catch (error) {} } catch (error) {}
} }
......
...@@ -14,7 +14,7 @@ const Profile = () => { ...@@ -14,7 +14,7 @@ const Profile = () => {
async function getProfile(userID) { async function getProfile(userID) {
try { try {
const data = await userApi.getUser({id:userID}); const data = await userApi.getUser(userID);
setProfile(data.img) setProfile(data.img)
} catch (error) {} } catch (error) {}
......
...@@ -23,7 +23,7 @@ const update = async (req, res) => { ...@@ -23,7 +23,7 @@ const update = async (req, res) => {
} }
}; };
const getUser = 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) res.json(user)
}; };
...@@ -43,7 +43,6 @@ const updateinfo = async (req, res) => { ...@@ -43,7 +43,6 @@ const updateinfo = async (req, res) => {
}; };
const login = async (req, res) => { const login = async (req, res) => {
try { try {
// console.log('login= ', req.body)
const { email, password } = req.body const { email, password } = req.body
const user = await User.findOne({ where: { email: email } }) const user = await User.findOne({ where: { email: email } })
if (!user) { if (!user) {
...@@ -65,7 +64,6 @@ const login = async (req, res) => { ...@@ -65,7 +64,6 @@ const login = async (req, res) => {
} }
} }
} catch (error) { } catch (error) {
// console.log(error)
return res.status(500).send('로그인 중 에러') return res.status(500).send('로그인 중 에러')
} }
}; };
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment