aboutsummaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2020-09-27 10:04:56 +0000
committerr <r@freesoftwareextremist.com>2020-09-27 10:04:56 +0000
commit2b1c703b6ca0b670a11217802d6e4d64ffbf2601 (patch)
tree5fb497cabeb95b37e5d6b1824b1177c764e014b5 /service
parent59692b715578cf02b8f01eda4692858ad922670e (diff)
downloadbloat-2b1c703b6ca0b670a11217802d6e4d64ffbf2601.tar.gz
bloat-2b1c703b6ca0b670a11217802d6e4d64ffbf2601.zip
Add likes list
Diffstat (limited to 'service')
-rw-r--r--service/service.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/service/service.go b/service/service.go
index 0b23d47..9190ca4 100644
--- a/service/service.go
+++ b/service/service.go
@@ -541,6 +541,18 @@ func (svc *service) ServeUserPage(c *model.Client, id string, pageType string,
nextLink = fmt.Sprintf("/user/%s/blocks?max_id=%s",
id, pg.MaxID)
}
+ case "likes":
+ if !isCurrent {
+ return errInvalidArgument
+ }
+ statuses, err = c.GetFavourites(ctx, &pg)
+ if err != nil {
+ return
+ }
+ if len(statuses) == 20 && len(pg.MaxID) > 0 {
+ nextLink = fmt.Sprintf("/user/%s/likes?max_id=%s",
+ id, pg.MaxID)
+ }
default:
return errInvalidArgument
}