photoprism/internal/session/session_delete.go
Michael Mayer f5a8c5a45d Auth: Session and ACL enhancements #98 #1746
Signed-off-by: Michael Mayer <michael@photoprism.app>
2022-09-28 09:01:17 +02:00

18 lines
298 B
Go

package session
import (
"github.com/photoprism/photoprism/internal/entity"
)
// Delete removes a client session by id.
func (s *Session) Delete(id string) error {
if id == "" {
return nil
}
if m, err := entity.FindSession(id); err != nil {
return err
} else {
return m.Delete()
}
}