photoprism/internal/get/photos.go

20 lines
270 B
Go
Raw Normal View History

package get
import (
"sync"
"github.com/photoprism/photoprism/internal/photoprism"
)
var oncePhotos sync.Once
func initPhotos() {
services.Photos = photoprism.NewPhotos()
}
func Photos() *photoprism.Photos {
oncePhotos.Do(initPhotos)
return services.Photos
}