Esempio n. 1
0
        def routine(user: User, thread: Thread):
            """
            Returns Thread's Posts list in JSON object representation.

            :param user:   Requesting User object
            :param thread: Thread ID
            :return: Thread's Posts list in JSON
            """
            return responses.successful(200, [JSONRepresentation.post(post, thread, user)
                                              for post in thread.get_posts(page)])