Example #1
0
 def get(self, request, *args, **kwargs):
     token = self.request.COOKIES.get('user_token')
     self.hub = AuthServiceApi.get_hub(self.kwargs.get('dest_hub'))
     self.devices = InternalApi.get_devices(token, self.hub)
     return super(ConnectUnitDeviceSelectView,
                  self).get(request, *args, **kwargs)
Example #2
0
 def get(self, request, *args, **kwargs):
     hub = AuthServiceApi.get_hub(int(kwargs.get('hub')))
     self.hub = hub
     self.devices = InternalApi.get_devices(
         self.request.COOKIES.get('user_token'), hub)
     return super(HubDeviceView, self).get(request, *args, **kwargs)