mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-25 11:22:16 +00:00
Use gitea forked macaron (#7933)
Signed-off-by: Tamal Saha <tamal@appscode.com>
This commit is contained in:
parent
ca6fb004ac
commit
171b359877
410 changed files with 14910 additions and 13245 deletions
|
@ -22,7 +22,7 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/go-macaron/session"
|
||||
"gitea.com/macaron/session"
|
||||
)
|
||||
|
||||
// MemStore represents a in-memory session store implementation.
|
||||
|
@ -148,8 +148,8 @@ func (p *MemProvider) Exist(sid string) bool {
|
|||
return ok
|
||||
}
|
||||
|
||||
// Destory deletes a session by session ID.
|
||||
func (p *MemProvider) Destory(sid string) error {
|
||||
// Destroy deletes a session by session ID.
|
||||
func (p *MemProvider) Destroy(sid string) error {
|
||||
p.lock.Lock()
|
||||
defer p.lock.Unlock()
|
||||
|
||||
|
@ -174,7 +174,7 @@ func (p *MemProvider) Regenerate(oldsid, sid string) (session.RawStore, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
if err = p.Destory(oldsid); err != nil {
|
||||
if err = p.Destroy(oldsid); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
|
|
@ -10,13 +10,13 @@ import (
|
|||
"fmt"
|
||||
"sync"
|
||||
|
||||
"github.com/go-macaron/session"
|
||||
couchbase "github.com/go-macaron/session/couchbase"
|
||||
memcache "github.com/go-macaron/session/memcache"
|
||||
mysql "github.com/go-macaron/session/mysql"
|
||||
nodb "github.com/go-macaron/session/nodb"
|
||||
postgres "github.com/go-macaron/session/postgres"
|
||||
redis "github.com/go-macaron/session/redis"
|
||||
"gitea.com/macaron/session"
|
||||
couchbase "gitea.com/macaron/session/couchbase"
|
||||
memcache "gitea.com/macaron/session/memcache"
|
||||
mysql "gitea.com/macaron/session/mysql"
|
||||
nodb "gitea.com/macaron/session/nodb"
|
||||
postgres "gitea.com/macaron/session/postgres"
|
||||
redis "gitea.com/macaron/session/redis"
|
||||
)
|
||||
|
||||
// VirtualSessionProvider represents a shadowed session provider implementation.
|
||||
|
@ -75,11 +75,11 @@ func (o *VirtualSessionProvider) Exist(sid string) bool {
|
|||
return true
|
||||
}
|
||||
|
||||
// Destory deletes a session by session ID.
|
||||
func (o *VirtualSessionProvider) Destory(sid string) error {
|
||||
// Destroy deletes a session by session ID.
|
||||
func (o *VirtualSessionProvider) Destroy(sid string) error {
|
||||
o.lock.Lock()
|
||||
defer o.lock.Unlock()
|
||||
return o.provider.Destory(sid)
|
||||
return o.provider.Destroy(sid)
|
||||
}
|
||||
|
||||
// Regenerate regenerates a session store from old session ID to new one.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue