diff options
author | r <r@freesoftwareextremist.com> | 2020-03-04 15:59:59 +0000 |
---|---|---|
committer | r <r@freesoftwareextremist.com> | 2020-03-04 15:59:59 +0000 |
commit | 911c9b79937a82bd4574972fa24f45f5cb922092 (patch) | |
tree | c0f0ce04c6e0d0e2b8a7b552b8cb887ceb362ad5 /service/service.go | |
parent | 35a8c247d910f4a17aea5dd9df511f6e44bbc4bf (diff) | |
download | bloat-911c9b79937a82bd4574972fa24f45f5cb922092.tar.gz bloat-911c9b79937a82bd4574972fa24f45f5cb922092.zip |
Remove session details on signout
Diffstat (limited to 'service/service.go')
-rw-r--r-- | service/service.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/service/service.go b/service/service.go index e81e007..b039849 100644 --- a/service/service.go +++ b/service/service.go @@ -38,6 +38,7 @@ type Service interface { NewSession(ctx context.Context, instance string) (redirectUrl string, sessionID string, err error) Signin(ctx context.Context, c *model.Client, sessionID string, code string) (token string, userID string, err error) + Signout(ctx context.Context, c *model.Client) (err error) Post(ctx context.Context, c *model.Client, content string, replyToID string, format string, visibility string, isNSFW bool, files []*multipart.FileHeader) (id string, err error) Like(ctx context.Context, c *model.Client, id string) (count int64, err error) @@ -722,6 +723,11 @@ func (svc *service) Signin(ctx context.Context, c *model.Client, return } +func (svc *service) Signout(ctx context.Context, c *model.Client) (err error) { + svc.sessionRepo.Remove(c.Session.ID) + return +} + func (svc *service) Post(ctx context.Context, c *model.Client, content string, replyToID string, format string, visibility string, isNSFW bool, files []*multipart.FileHeader) (id string, err error) { |