mirror of
https://gitea.phreedom.club/localhost_frssoft/bloat.git
synced 2025-05-09 21:38:45 +00:00
Add poll support
Currenlty only voting is possible.
This commit is contained in:
parent
a68a09a83e
commit
cfec7879e3
9 changed files with 182 additions and 39 deletions
|
@ -42,6 +42,7 @@ type Service interface {
|
|||
UnLike(ctx context.Context, c *model.Client, id string) (count int64, err error)
|
||||
Retweet(ctx context.Context, c *model.Client, id string) (count int64, err error)
|
||||
UnRetweet(ctx context.Context, c *model.Client, id string) (count int64, err error)
|
||||
Vote(ctx context.Context, c *model.Client, id string, choices []string) (err error)
|
||||
Follow(ctx context.Context, c *model.Client, id string) (err error)
|
||||
UnFollow(ctx context.Context, c *model.Client, id string) (err error)
|
||||
Mute(ctx context.Context, c *model.Client, id string) (err error)
|
||||
|
@ -843,6 +844,15 @@ func (svc *service) UnRetweet(ctx context.Context, c *model.Client, id string) (
|
|||
return
|
||||
}
|
||||
|
||||
func (svc *service) Vote(ctx context.Context, c *model.Client, id string,
|
||||
choices []string) (err error) {
|
||||
_, err = c.Vote(ctx, id, choices)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (svc *service) Follow(ctx context.Context, c *model.Client, id string) (err error) {
|
||||
_, err = c.AccountFollow(ctx, id)
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue