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
0b842128
Commit
0b842128
authored
Jul 28, 2021
by
seoyeon
Browse files
merge
parent
1aa67949
Changes
2
Show whitespace changes
Inline
Side-by-side
client/src/apis/user.api.js
View file @
0b842128
import
axios
from
"
axios
"
;
const
getUser
=
async
(
i
d
)
=>
{
const
{
data
}
=
await
axios
.
ge
t
(
`
/api/getUser
/
${
id
}
`
);
const
getUser
=
async
(
payloa
d
)
=>
{
const
{
data
}
=
await
axios
.
pos
t
(
"
/api/getUser
"
,
payload
);
return
data
;
};
...
...
routes/user.route.js
View file @
0b842128
...
...
@@ -3,7 +3,7 @@ import userCtrl from "../controllers/user.controller.js";
const
router
=
express
.
Router
();
router
.
route
(
"
/getUser
"
).
ge
t
(
userCtrl
.
getUser
);
router
.
route
(
"
/getUser
"
).
pos
t
(
userCtrl
.
getUser
);
router
.
route
(
"
/login
"
).
post
(
userCtrl
.
login
);
router
.
route
(
"
/signup
"
).
post
(
userCtrl
.
signup
);
...
...
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