From 9b5bbd3988bfda8e013df9d4d573ce33cb9de126 Mon Sep 17 00:00:00 2001 From: Chneemann Date: Thu, 15 Aug 2024 17:07:27 +0200 Subject: [PATCH] auth mail adapted to the server --- backend/videoflix/auth/views.py | 4 ++-- backend/videoflix/content/signals.py | 2 +- backend/videoflix/templates/forgot_password_mail.html | 2 +- backend/videoflix/templates/register_mail.html | 2 +- .../components/home/browse/categories/categories.component.ts | 2 +- .../home/browse/hero-banner/hero-banner.component.ts | 2 +- frontend/src/app/environments/environment.ts | 4 ++-- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/backend/videoflix/auth/views.py b/backend/videoflix/auth/views.py index f8f531a..a6d1bc9 100644 --- a/backend/videoflix/auth/views.py +++ b/backend/videoflix/auth/views.py @@ -65,7 +65,7 @@ class RegisterView(APIView): subject='Confirm your email', body=strip_tags(html_body), # Plain text fallback from_email='noreply@videoflix.com', - to=['andre.kempf.dev@gmail.com'] + to=user.email ) message.attach_alternative(html_body, "text/html") message.send(fail_silently=False) @@ -116,7 +116,7 @@ class ForgotPasswordView(APIView): subject='Reset your Password', body=strip_tags(html_body), # Plain text fallback from_email='noreply@videoflix.com', - to=['andre.kempf.dev@gmail.com'] + to=user.email ) message.attach_alternative(html_body, "text/html") message.send(fail_silently=False) diff --git a/backend/videoflix/content/signals.py b/backend/videoflix/content/signals.py index 4ca402a..41cec88 100644 --- a/backend/videoflix/content/signals.py +++ b/backend/videoflix/content/signals.py @@ -1,5 +1,5 @@ from .models import Video -from .tasks import convert_video_to_hls, create_thumbnails, delete_original_video, update_thumbnail_status +from .tasks import convert_video_to_hls, create_thumbnails, delete_original_video from django.dispatch import receiver from django.db.models.signals import post_save, post_delete from django.conf import settings diff --git a/backend/videoflix/templates/forgot_password_mail.html b/backend/videoflix/templates/forgot_password_mail.html index c7923d4..9c687d3 100644 --- a/backend/videoflix/templates/forgot_password_mail.html +++ b/backend/videoflix/templates/forgot_password_mail.html @@ -39,7 +39,7 @@

We recently received a request to reset your password. If you made this request, please click on the following link to reset your password:

- Reset Password + Reset Password

Please note that for security reasons, this link is only valid for 24 hours.

If you did not request a password reset, please ignore this email.

Best regards,

diff --git a/backend/videoflix/templates/register_mail.html b/backend/videoflix/templates/register_mail.html index 240233d..60f0b74 100644 --- a/backend/videoflix/templates/register_mail.html +++ b/backend/videoflix/templates/register_mail.html @@ -40,7 +40,7 @@ Thank you for registering with Videoflix. To complete your registration and verify your email address, please click the link below:

- Activate account + Activate account

If you did not create an account with us, please disregard this email.

diff --git a/frontend/src/app/components/home/browse/categories/categories.component.ts b/frontend/src/app/components/home/browse/categories/categories.component.ts index a9a06c2..54ac3af 100644 --- a/frontend/src/app/components/home/browse/categories/categories.component.ts +++ b/frontend/src/app/components/home/browse/categories/categories.component.ts @@ -14,7 +14,7 @@ export class CategoriesComponent { @Input() currentMovie: number = 0; @Output() currentMovieId = new EventEmitter(); - environmentBaseUrl: string = environment.baseUrl.slice(0, -1); + environmentBaseUrl: string = environment.baseUrl; filmGenres = [ 'action', diff --git a/frontend/src/app/components/home/browse/hero-banner/hero-banner.component.ts b/frontend/src/app/components/home/browse/hero-banner/hero-banner.component.ts index 55b67bf..d59f4e3 100644 --- a/frontend/src/app/components/home/browse/hero-banner/hero-banner.component.ts +++ b/frontend/src/app/components/home/browse/hero-banner/hero-banner.component.ts @@ -21,7 +21,7 @@ export class HeroBannerComponent { @Input() currentMovie: any[] = []; @Output() playMovie = new EventEmitter(); - environmentBaseUrl: string = environment.baseUrl.slice(0, -1); + environmentBaseUrl: string = environment.baseUrl; constructor(private el: ElementRef, private movieService: MovieService) {} diff --git a/frontend/src/app/environments/environment.ts b/frontend/src/app/environments/environment.ts index c12cd63..677b433 100644 --- a/frontend/src/app/environments/environment.ts +++ b/frontend/src/app/environments/environment.ts @@ -1,7 +1,7 @@ export const environment = { // Development - baseUrl: 'http://127.0.0.1:8000/', + //baseUrl: 'http://127.0.0.1:8000', // Live - // baseUrl: 'https://videoflix-django.andre-kempf.com', + baseUrl: 'https://videoflix-django.andre-kempf.com', };