mirror of
https://github.com/mrusme/neonmodem.git
synced 2024-12-04 14:46:37 -05:00
Tried debugging Lemmy comments issue
https://github.com/Arsen6331/go-lemmy/issues/1
This commit is contained in:
parent
9c50ddffdc
commit
7c9c3413cb
@ -41,7 +41,8 @@ func (post Post) Title() string {
|
||||
|
||||
func (post Post) Description() string {
|
||||
return fmt.Sprintf(
|
||||
"%s in %s on %s",
|
||||
"[%s] %s in %s on %s",
|
||||
post.ID,
|
||||
post.Author.Name,
|
||||
post.Forum.Name,
|
||||
post.CreatedAt.Format("Jan 2 2006"),
|
||||
|
@ -83,8 +83,9 @@ func (sys *System) Load() error {
|
||||
|
||||
func (sys *System) ListPosts(sysIdx int) ([]post.Post, error) {
|
||||
resp, err := sys.client.Posts(context.Background(), types.GetPosts{
|
||||
Type: types.NewOptional(types.ListingLocal),
|
||||
Type: types.NewOptional(types.ListingSubscribed),
|
||||
Sort: types.NewOptional(types.New),
|
||||
Limit: types.NewOptional(int64(50)),
|
||||
})
|
||||
if err != nil {
|
||||
return []post.Post{}, err
|
||||
@ -144,8 +145,15 @@ func (sys *System) LoadPost(p *post.Post) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// cid, err := strconv.Atoi(p.Forum.ID)
|
||||
// if err != nil {
|
||||
// return err
|
||||
// }
|
||||
|
||||
resp, err := sys.client.Comments(context.Background(), types.GetComments{
|
||||
Type: types.NewOptional(types.ListingLocal),
|
||||
Sort: types.NewOptional(types.CommentSortHot),
|
||||
// CommunityID: types.NewOptional(cid),
|
||||
PostID: types.NewOptional(pid),
|
||||
})
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user