photoprism/internal/service/places.go

19 lines
282 B
Go

package service
import (
"sync"
"github.com/photoprism/photoprism/internal/photoprism"
)
var oncePlaces sync.Once
func initPlaces() {
services.Places = photoprism.NewPlaces(Config())
}
func Places() *photoprism.Places {
oncePlaces.Do(initPlaces)
return services.Places
}