Commit 38962780 authored by seoyeon's avatar seoyeon
Browse files

.

parent 6f96c999
import axios from "axios"; import axios from "axios";
const getUser = async (payload) => { const getUser = async (id) => {
const { data } = await axios.post("/api/getUser", payload); const { data } = await axios.get(`/api/getUser/${id}`);
return data; return data;
}; };
......
...@@ -3,7 +3,6 @@ import { Link } from 'react-router-dom' ...@@ -3,7 +3,6 @@ import { Link } from 'react-router-dom'
import roomApi from '../../apis/room.api'; import roomApi from '../../apis/room.api';
import userApi from '../../apis/user.api'; import userApi from '../../apis/user.api';
const RoomSingle = () => { const RoomSingle = () => {
const [roomNum, setRoomNum] = useState([]) const [roomNum, setRoomNum] = useState([])
const [room, setRoom] = useState([]) const [room, setRoom] = useState([])
......
...@@ -3,7 +3,7 @@ import userCtrl from "../controllers/user.controller.js"; ...@@ -3,7 +3,7 @@ import userCtrl from "../controllers/user.controller.js";
const router = express.Router(); const router = express.Router();
router.route("/getUser").post(userCtrl.getUser); router.route("/getUser").get(userCtrl.getUser);
router.route("/login").post(userCtrl.login); router.route("/login").post(userCtrl.login);
router.route("/signup").post(userCtrl.signup); router.route("/signup").post(userCtrl.signup);
......
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