mirror of
https://github.com/astaxie/beego.git
synced 2025-06-14 11:20:40 +00:00
Add interface change in pkg folder
This commit is contained in:
@ -179,16 +179,16 @@ func (cp *Provider) SessionRead(sid string) (session.Store, error) {
|
||||
|
||||
// SessionExist Check couchbase session exist.
|
||||
// it checkes sid exist or not.
|
||||
func (cp *Provider) SessionExist(sid string) bool {
|
||||
func (cp *Provider) SessionExist(sid string) (bool, error) {
|
||||
cp.b = cp.getBucket()
|
||||
defer cp.b.Close()
|
||||
|
||||
var doc []byte
|
||||
|
||||
if err := cp.b.Get(sid, &doc); err != nil || doc == nil {
|
||||
return false
|
||||
return false, err
|
||||
}
|
||||
return true
|
||||
return true, nil
|
||||
}
|
||||
|
||||
// SessionRegenerate remove oldsid and use sid to generate new session
|
||||
|
Reference in New Issue
Block a user