def _list_blogs(self): blog_list = Blog.get_all_blogs() for blog in blog_list: self.__print_blog(blog)
def fetch_blog(): x = Blog.get_all_blogs() blog_posts = blog_schema.dump(x, many=True) return blog_posts
async def get_all_blogs(current_user: UserInfo = Depends(get_current_user), db: Session = Depends(get_db)): return Blog.get_all_blogs(db=db)