def post(self): logging.info("ViewerUnPair") user = ModelLoader.get_user(users.get_current_user().user_id()) viewer = ModelLoader.get_viewer(user, self.request.POST.get("viewer_id")) if viewer != None: viewer.delete()
def post(self): logging.info("ViewerPair") user = ModelLoader.get_user(users.get_current_user().user_id()) viewer = ModelLoader.get_viewer(user,self.request.POST.get("viewer_id"),self.request.POST.get("viewer_name")) self.response.headers['Content-Type'] = 'application/json'; self.response.out.write(json.dumps({'token':viewer.token}));
def post(self): logging.info("ViewerPair") user = ModelLoader.get_user(users.get_current_user().user_id()) viewer = ModelLoader.get_viewer(user, self.request.POST.get("viewer_id"), self.request.POST.get("viewer_name")) self.response.headers['Content-Type'] = 'application/json' self.response.out.write(json.dumps({'token': viewer.token}))
def get(self): self.response.headers['Content-Type'] = 'text/plain' self.response.write( 'Hello, ' + str(ModelLoader.get_user(users.get_current_user().user_id())))
def post(self): logging.info("ViewerUnPair") user = ModelLoader.get_user(users.get_current_user().user_id()) viewer = ModelLoader.get_viewer(user,self.request.POST.get("viewer_id")) if viewer != None: viewer.delete()
def get(self): self.response.headers['Content-Type'] = 'text/plain' self.response.write('Hello, ' + str(ModelLoader.get_user(users.get_current_user().user_id())))