diff options
Diffstat (limited to 'service/auth.go')
-rw-r--r-- | service/auth.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/service/auth.go b/service/auth.go index 6c71439..4c5b38b 100644 --- a/service/auth.go +++ b/service/auth.go @@ -250,6 +250,19 @@ func (s *as) UnRetweet(ctx context.Context, c *model.Client, id string) (count i return s.Service.UnRetweet(ctx, c, id) } +func (s *as) Vote(ctx context.Context, c *model.Client, id string, + choices []string) (err error) { + err = s.authenticateClient(ctx, c) + if err != nil { + return + } + err = checkCSRF(ctx, c) + if err != nil { + return + } + return s.Service.Vote(ctx, c, id, choices) +} + func (s *as) Follow(ctx context.Context, c *model.Client, id string) (err error) { err = s.authenticateClient(ctx, c) if err != nil { |