mirror of
https://github.com/i701/sarlink-portal-api.git
synced 2025-06-27 22:03:58 +00:00
Enhance environment variable handling, add Celery configuration, and implement device expiration notification tasks
Some checks failed
Build and Push Docker Images / Build and Push Docker Images (push) Failing after 13m45s
Some checks failed
Build and Push Docker Images / Build and Push Docker Images (push) Failing after 13m45s
This commit is contained in:
14
api/views.py
14
api/views.py
@ -31,7 +31,7 @@ from typing import cast, Dict, Any
|
||||
from django.core.mail import send_mail
|
||||
from django.db.models import Q
|
||||
from api.sms import send_otp
|
||||
|
||||
from .tasks import add, deactivate_expired_devices
|
||||
|
||||
# local apps import
|
||||
from .serializers import (
|
||||
@ -57,6 +57,13 @@ class ErrorMessages:
|
||||
UNDERAGE_ERROR = "You must be 18 and above to signup."
|
||||
|
||||
|
||||
@api_view(["GET"])
|
||||
def healthcheck(request):
|
||||
add.delay(1, 2)
|
||||
deactivate_expired_devices.delay()
|
||||
return Response({"status": "Good"}, status=status.HTTP_200_OK)
|
||||
|
||||
|
||||
class UpdateUserWalletView(generics.UpdateAPIView):
|
||||
# Create user API view
|
||||
serializer_class = CustomUserByWalletBalanceSerializer
|
||||
@ -416,11 +423,6 @@ class UserDetailAPIView(StaffEditorPermissionMixin, generics.RetrieveAPIView):
|
||||
return Response(data)
|
||||
|
||||
|
||||
@api_view(["GET"])
|
||||
def healthcheck(request):
|
||||
return Response({"status": "Good"}, status=status.HTTP_200_OK)
|
||||
|
||||
|
||||
@api_view(["POST"])
|
||||
@permission_classes((permissions.AllowAny,))
|
||||
def test_email(request):
|
||||
|
Reference in New Issue
Block a user