Skip to content
Snippets Groups Projects
Commit d8c72067 authored by 조대희's avatar 조대희
Browse files

fix: 친구 라우터, 컨트롤러 enpoint, 오타 수정

parent a1fce5e0
Branches
No related tags found
1 merge request!31Develop
const FriendService = require('../services/friendService'); const FriendService = require('../services/friendService');
const { User } = require('../models');
class friendController { class friendController {
/** /**
...@@ -20,7 +21,7 @@ class friendController { ...@@ -20,7 +21,7 @@ class friendController {
} }
const friendId = receiver.id; const friendId = receiver.id;
// 친구 요청 보내기 서비스 호출 // 친구 요청 보내기 서비스 호출
const friendRequest = await friendService.sendFriendRequest(userId, friendId); const friendRequest = await FriendService.sendFriendRequest(userId, friendId);
return res.status(201).json({ return res.status(201).json({
success:true, success:true,
data:friendRequest data:friendRequest
......
...@@ -7,9 +7,9 @@ router.use(isLoggedIn); ...@@ -7,9 +7,9 @@ router.use(isLoggedIn);
/** /**
* 친구 요청 보내기 * 친구 요청 보내기
* POST /api/friend/request/:friendId * POST /api/friend/request
*/ */
router.post('/request/:friendId', FriendController.sendFriendRequest); router.post('/request', FriendController.sendFriendRequest);
/** /**
* 받은 친구 요청 목록 조회 * 받은 친구 요청 목록 조회
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment