Merge pull request #156 from KiwiTechLLC/sprint4

guardian list api changes
This commit is contained in:
dilipshrivastwa-kiwi
2023-08-08 12:35:43 +05:30
committed by GitHub
7 changed files with 81 additions and 12 deletions

View File

@ -36,7 +36,7 @@ from account.models import UserEmailOtp, UserNotification
from .tasks import generate_otp
from account.utils import custom_response, custom_error_response, OTP_EXPIRY, send_otp_email
from base.messages import ERROR_CODE, SUCCESS_CODE
from base.constants import NUMBER
from base.constants import NUMBER, GUARDIAN_CODE_STATUS
from .utils import upload_image_to_alibaba
from notifications.constants import REGISTRATION, TASK_CREATED, LEADERBOARD_RANKING
from notifications.utils import send_notification
@ -379,6 +379,6 @@ class GuardianListAPIView(viewsets.ModelViewSet):
# use GuardianDetailListSerializer serializer
serializer = GuardianDetailListSerializer(guardian_data, many=True)
return custom_response(None, serializer.data, response_status=status.HTTP_200_OK)
return custom_response(ERROR_CODE['2068'], response_status=status.HTTP_200_OK)
return custom_response({"status": GUARDIAN_CODE_STATUS['1']},response_status=status.HTTP_200_OK)
except Exception as e:
return custom_error_response(str(e), response_status=status.HTTP_400_BAD_REQUEST)