Skip to content

Commit

Permalink
Merge pull request #668 from bounswe/update-admin-feature
Browse files Browse the repository at this point in the history
Update update_content_status
  • Loading branch information
hakanaktas0 authored Dec 22, 2023
2 parents b27ae42 + 23aacc0 commit b2c21ca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions project/backend/api/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ def test_get_user_profile(self):
data = {'mail':'[email protected]'}
response = self.client.get(self.get_profile_url, data, format="json")
self.assertEqual(response.status_code,200)
self.assertEqual(response.json()['id'], 1)
self.assertEqual(response.json()['name'],'User')
self.assertEqual(response.json()['surname'], 'Test')
self.assertEqual(response.json()['bio'], 'Hello')
Expand Down
3 changes: 2 additions & 1 deletion project/backend/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,8 @@ def get_profile(request):
if Admin.objects.filter(id=basic_user.id).exists():
user_type = 'admin'

return JsonResponse({'name':user.first_name,
return JsonResponse({'id': user.id,
'name':user.first_name,
'surname':user.last_name,
'orcid': orcid,
'bio':basic_user.bio,
Expand Down

0 comments on commit b2c21ca

Please sign in to comment.