fix meal api and force update api
This commit is contained in:
@@ -349,14 +349,18 @@ class AppleSignin(APIView):
|
||||
class VersionCheck(APIView):
|
||||
authentication_classes = []
|
||||
permission_classes = []
|
||||
model = AppVersion
|
||||
|
||||
def get(self, request, *args, **kwargs):
|
||||
app_version = request.GET.get('appVersion')
|
||||
device_type = request.GET.get('deviceType')
|
||||
|
||||
if not app_version or not device_type:
|
||||
return ApiResponse.error(message=constants.FAILURE, errors="App version and device type is required")
|
||||
# Query the database to retrieve the upgrade flags based on the app version
|
||||
try:
|
||||
version = AppVersion.objects.get(version=app_version)
|
||||
except AppVersion.DoesNotExist:
|
||||
version = self.model.objects.get(version=app_version)
|
||||
except self.model.DoesNotExist:
|
||||
version = None
|
||||
|
||||
if version:
|
||||
|
||||
Reference in New Issue
Block a user