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
38962780
Commit
38962780
authored
Jul 28, 2021
by
seoyeon
Browse files
.
parent
6f96c999
Changes
3
Show whitespace changes
Inline
Side-by-side
client/src/apis/user.api.js
View file @
38962780
import
axios
from
"
axios
"
;
const
getUser
=
async
(
payloa
d
)
=>
{
const
{
data
}
=
await
axios
.
pos
t
(
"
/api/getUser
"
,
payload
);
const
getUser
=
async
(
i
d
)
=>
{
const
{
data
}
=
await
axios
.
ge
t
(
`
/api/getUser
/
${
id
}
`
);
return
data
;
};
...
...
client/src/components/Home/RoomSingle.js
View file @
38962780
...
...
@@ -3,7 +3,6 @@ import { Link } from 'react-router-dom'
import
roomApi
from
'
../../apis/room.api
'
;
import
userApi
from
'
../../apis/user.api
'
;
const
RoomSingle
=
()
=>
{
const
[
roomNum
,
setRoomNum
]
=
useState
([])
const
[
room
,
setRoom
]
=
useState
([])
...
...
routes/user.route.js
View file @
38962780
...
...
@@ -3,7 +3,7 @@ import userCtrl from "../controllers/user.controller.js";
const
router
=
express
.
Router
();
router
.
route
(
"
/getUser
"
).
pos
t
(
userCtrl
.
getUser
);
router
.
route
(
"
/getUser
"
).
ge
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