def post(self, code): video = Video.get_or_create(g.store, {'code': code}) user = self.get_resource('user', create=True) video.append(user, ip=get_ip()) g.store.commit() return video.dict(users=is_authenticated())