diff options
author | r <r@freesoftwareextremist.com> | 2020-02-09 13:42:16 +0000 |
---|---|---|
committer | r <r@freesoftwareextremist.com> | 2020-02-09 13:42:16 +0000 |
commit | cfec7879e3b3fc38956f2dce0acbbeb8a578f4c1 (patch) | |
tree | 5da9a9371fd10667cd6ee68bbd07f7f0f9d8d3d3 /service/logging.go | |
parent | a68a09a83ef2eb411e2a7a66e919f27c040c0b6a (diff) | |
download | bloat-cfec7879e3b3fc38956f2dce0acbbeb8a578f4c1.tar.gz bloat-cfec7879e3b3fc38956f2dce0acbbeb8a578f4c1.zip |
Add poll support
Currenlty only voting is possible.
Diffstat (limited to 'service/logging.go')
-rw-r--r-- | service/logging.go | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/service/logging.go b/service/logging.go index e429fac..055dadd 100644 --- a/service/logging.go +++ b/service/logging.go @@ -77,7 +77,7 @@ func (s *ls) ServeNotificationPage(ctx context.Context, c *model.Client, return s.Service.ServeNotificationPage(ctx, c, maxID, minID) } -func (s *ls) ServeUserPage(ctx context.Context, c *model.Client, id string, +func (s *ls) ServeUserPage(ctx context.Context, c *model.Client, id string, pageType string, maxID string, minID string) (err error) { defer func(begin time.Time) { s.logger.Printf("method=%v, id=%v, type=%v, took=%v, err=%v\n", @@ -111,7 +111,7 @@ func (s *ls) ServeSearchPage(ctx context.Context, c *model.Client, q string, return s.Service.ServeSearchPage(ctx, c, q, qType, offset) } -func (s *ls) ServeUserSearchPage(ctx context.Context, c *model.Client, +func (s *ls) ServeUserSearchPage(ctx context.Context, c *model.Client, id string, q string, offset int) (err error) { defer func(begin time.Time) { s.logger.Printf("method=%v, took=%v, err=%v\n", @@ -189,6 +189,14 @@ func (s *ls) UnRetweet(ctx context.Context, c *model.Client, id string) (count i return s.Service.UnRetweet(ctx, c, id) } +func (s *ls) Vote(ctx context.Context, c *model.Client, id string, choices []string) (err error) { + defer func(begin time.Time) { + s.logger.Printf("method=%v, id=%v, took=%v, err=%v\n", + "Vote", id, time.Since(begin), err) + }(time.Now()) + return s.Service.Vote(ctx, c, id, choices) +} + func (s *ls) Follow(ctx context.Context, c *model.Client, id string) (err error) { defer func(begin time.Time) { s.logger.Printf("method=%v, id=%v, took=%v, err=%v\n", |