photoprism/internal/service/photos.go

20 lines
274 B
Go
Raw Normal View History

package service
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
}