2022-10-15 21:54:11 +02:00
|
|
|
package get
|
2020-04-20 13:50:28 +02:00
|
|
|
|
|
|
|
import (
|
|
|
|
"sync"
|
|
|
|
|
|
|
|
"github.com/photoprism/photoprism/internal/session"
|
|
|
|
)
|
|
|
|
|
|
|
|
var onceSession sync.Once
|
|
|
|
|
|
|
|
func initSession() {
|
2022-10-02 11:38:30 +02:00
|
|
|
services.Session = session.New(Config())
|
2020-04-20 13:50:28 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func Session() *session.Session {
|
|
|
|
onceSession.Do(initSession)
|
|
|
|
|
|
|
|
return services.Session
|
|
|
|
}
|