mirror of
https://gitea.phreedom.club/localhost_frssoft/bloat.git
synced 2025-05-09 21:38:45 +00:00
Remove session details on signout
This commit is contained in:
parent
35a8c247d9
commit
911c9b7993
9 changed files with 49 additions and 3 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue