/
githubmirror
/
photoprism
Обзор
Документация
Войти
/
githubmirror
/
photoprism
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
internal/auth/session/session_get.go
23 строки
473 B
Michael Mayer
Backend: Move session package to /internal/auth/session
02 июл 2024, 09:11
02 июл 2024, 09:11
fb186bf
Код
Авторство
О чём код?
package session import ( "fmt" "github.com/photoprism/photoprism/internal/entity" ) // Get returns an existing client session. func (s *Session) Get(id string) (m *entity.Session, err error) { if id == "" { return &entity.Session{}, fmt.Errorf("session id is missing") } return entity.FindSession(id) } // Exists checks whether a client session with the specified ID exists. func (s *Session) Exists(id string) bool { _, err := s.Get(id) return err == nil }