예제 #1
0
 def professor_get_comments(self, request):
     professor = Professor.get_professor(request.value)
     if not professor:
         return comment_api.MultiCommentResponse(comments=[])
     comments = [comment_api.createCommentMessage(comment) for comment in professor.get_comments()]
     return comment_api.MultiCommentResponse(comments=comments)
예제 #2
0
 def article_get_comments(self, request):
     article = Article.get_article(request.value)
     if not article:
         return comment_api.MultiCommentResponse(comments=[])
     comments = [comment_api.createCommentMessage(comment) for comment in article.get_comments()]
     return comment_api.MultiCommentResponse(comments=comments)