Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
TDT4242 Spring 2021 – T17
tdt4242-T17
Commits
4a7f1514
Commit
4a7f1514
authored
Mar 15, 2021
by
Erlend Ydse
Browse files
Fix adding friends and updating profile image and bio
parent
a3c0b2ab
Pipeline
#117166
failed with stage
in 1 minute and 2 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
backend/secfit/users/views.py
View file @
4a7f1514
...
...
@@ -83,7 +83,7 @@ class UserDetail(
return
self
.
update
(
request
,
*
args
,
**
kwargs
)
def
patch
(
self
,
request
,
*
args
,
**
kwargs
):
self
.
serializer_class
=
UserPutSerializer
#
self.serializer_class = UserPutSerializer
return
self
.
partial_update
(
request
,
*
args
,
**
kwargs
)
...
...
frontend/www/scripts/friends.js
View file @
4a7f1514
...
...
@@ -166,7 +166,7 @@ function renderSearchResult(friends) {
a
.
href
=
`profile.html?id=
${
friend
.
id
}
`
;
const
button
=
divFriendRequest
.
querySelector
(
"
button
"
);
button
.
addEventListener
(
"
click
"
,
()
=>
addFriend
(
friend
.
id
));
button
.
addEventListener
(
"
click
"
,
()
=>
addFriend
(
friend
.
url
));
container
.
appendChild
(
cloneFriendRequest
);
});
...
...
Write
Preview
Supports
Markdown
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