Example #1
0
 def post(self):
     channel_token = self.request.get('from')
     room_list = Room.all()
     for room in room_list:
         if room.current_user.user_id() == channel_token:
             room.active = True
             room.put()
Example #2
0
 def get(self):
     #self.response.out.write("400")
     room = Room.all()
     direction = "None"
     for s in room:
         if(s.direction):
             direction = s.direction
     self.response.out.write(direction)
Example #3
0
 def post(self):
     channel_token = self.request.get('from')
     user_crowd = Crowdee.all().filter("channel =", channel_token)
     #Although there should only be one user, it will still be received as a list.
     for user_crowdee in user_crowd:
         room = Room.get_by_key_name(user_crowdee.room)
         user_id = user_crowdee.user.user_id()
         user_crowdee.delete()
         if room:
             RoomUpdater(room).delete_move(user_id)
     room_list = Room.all()
     for room in room_list:
         if room.key().name() == channel_token:
             room.active = False
             room.put()