Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
WebBack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
websystem
WebBack
Commits
d223a47a
Commit
d223a47a
authored
3 months ago
by
조대희
Browse files
Options
Downloads
Patches
Plain Diff
refactor: 오타 수정 (
#8
)
parent
1026acd8
No related branches found
Branches containing commit
No related tags found
2 merge requests
!31
Develop
,
!9
[#8] Friend 컨트롤러, 라우터 로직 개발
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
controllers/friendController.js
+4
-4
4 additions, 4 deletions
controllers/friendController.js
services/friendService.js
+1
-1
1 addition, 1 deletion
services/friendService.js
with
5 additions
and
5 deletions
controllers/friendController.js
+
4
−
4
View file @
d223a47a
...
...
@@ -81,9 +81,9 @@ class friendController {
async
acceptRequest
(
req
,
res
)
{
try
{
const
userId
=
req
.
user
.
id
;
const
{
requesId
}
=
req
.
params
;
const
{
reques
t
Id
}
=
req
.
params
;
const
result
=
await
FriendService
.
acceptFriendRequest
(
requesId
,
userId
);
const
result
=
await
FriendService
.
acceptFriendRequest
(
reques
t
Id
,
userId
);
return
res
.
status
(
200
).
json
({
success
:
true
,
...
...
@@ -159,13 +159,13 @@ class friendController {
const
userId
=
req
.
user
.
id
;
const
{
friendId
}
=
req
.
params
;
const
result
=
await
FriendService
.
deleteFriend
(
user
,
friendId
);
const
result
=
await
FriendService
.
deleteFriend
(
user
Id
,
friendId
);
return
res
.
status
(
200
).
json
({
success
:
true
,
data
:
{
message
:
'
Friend deleted successfully
'
,
data
:
result
result
:
result
}
});
}
catch
(
error
)
{
...
...
This diff is collapsed.
Click to expand it.
services/friendService.js
+
1
−
1
View file @
d223a47a
const
{
Op
}
=
require
(
'
sequelize
'
);
const
Friend
=
require
(
'
../models/Friend
'
);
const
User
=
require
(
'
../models/
u
ser
'
);
const
User
=
require
(
'
../models/
U
ser
'
);
class
friendService
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment