Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

final merge from timmy #86

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open

final merge from timmy #86

wants to merge 18 commits into from

Conversation

timmyades3
Copy link
Collaborator

No description provided.

@vercel
Copy link

vercel bot commented Oct 24, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mentorme-be ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 30, 2023 3:01pm

Copy link
Contributor

@zxenonx zxenonx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @timmyades3
I left some comments.

core/settings.py Outdated
Comment on lines 117 to 126
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'neondb',
'USER': 'dimeji0518',
'PASSWORD': 'cy8vHl7ASYTj',
'HOST': 'ep-round-truth-56973996.us-east-2.aws.neon.tech',
'PORT': '5432',
'OPTIONS': {'sslmode': 'require'},
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not expose secrets and push them on Github.
This is a dangerous bad practice.
Use env variables.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok done thanks

path('sessions/<uuid:pk>/delete', views.SessionDeleteView.as_view(), name='session-delete'),


path('sessions/<uuid:pk>/delete/', views.SessionDeleteView.as_view(), name='session-delete'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
path('sessions/<uuid:pk>/delete/', views.SessionDeleteView.as_view(), name='session-delete'),
path('sessions/<uuid:pk>/', views.SessionDeleteView.as_view(), name='session-delete'),

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -27,23 +26,19 @@
path('resource/<str:id>', views.RetrieveResourceApiView.as_view(), name='resource-detail'),
path('resource/update/<str:id>/', views.updateResourceApiView.as_view(), name='resource-update'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
path('resource/update/<str:id>/', views.updateResourceApiView.as_view(), name='resource-update'),
path('resource/<str:id>/', views.updateResourceApiView.as_view(), name='resource-update'),

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

mail = request.user.email
user = get_object_or_404(CustomUser, email=mail)
id = kwargs.get("id")
if id is not None:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if id also works fine.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment on lines 68 to 71
if member := Members.objects.filter(community=community).first():
user_image = member.user.image
else:
user_image = None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove the else branch

Suggested change
if member := Members.objects.filter(community=community).first():
user_image = member.user.image
else:
user_image = None
user_image = None
if member := Members.objects.filter(community=community).first():
user_image = member.user.image

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems you haven't pushed the changes you've made @timmyades3

@zxenonx zxenonx mentioned this pull request Oct 27, 2023
@timmyades3
Copy link
Collaborator Author

Done

Copy link
Contributor

@zxenonx zxenonx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes @timmyades3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants