add some new data to device login data, first part of broker to stake holders assignment
This commit is contained in:
@@ -82,8 +82,9 @@ class POSDeviceViewSet(viewsets.ModelViewSet, POSDeviceMixin):
|
||||
"message": "login success - session activated",
|
||||
"device_identity": device.device_identity,
|
||||
"serial": device.serial,
|
||||
"password": device.password,
|
||||
"provider": organization.name,
|
||||
"provider_users": get_users_of_organization(organization),
|
||||
"provider_tell": '0214021',
|
||||
"device_owner": device_owner_org,
|
||||
"device_owner_users": get_users_of_organization(device_owner_org)
|
||||
}, status=status.HTTP_200_OK)
|
||||
@@ -91,9 +92,10 @@ class POSDeviceViewSet(viewsets.ModelViewSet, POSDeviceMixin):
|
||||
return Response({
|
||||
"message": "device pre registered - unauthorized",
|
||||
"device_identity": device.device_identity,
|
||||
"password": device.password,
|
||||
"serial": device.serial,
|
||||
"provider": organization.name,
|
||||
"provider_users": get_users_of_organization(organization),
|
||||
"provider_tell": '0214021',
|
||||
}, status=status.HTTP_401_UNAUTHORIZED)
|
||||
|
||||
pre_device = pos_models.Device.objects.create(
|
||||
@@ -106,8 +108,9 @@ class POSDeviceViewSet(viewsets.ModelViewSet, POSDeviceMixin):
|
||||
return Response({
|
||||
"message": "device pre-registered",
|
||||
"device_identity": pre_device.device_identity,
|
||||
"password": device.password,
|
||||
"provider": organization.name,
|
||||
"provider_users": get_users_of_organization(organization),
|
||||
"provider_tell": '0214021',
|
||||
}, status=status.HTTP_412_PRECONDITION_FAILED)
|
||||
|
||||
@action(
|
||||
|
||||
Reference in New Issue
Block a user