20 lines
274 B
Go
20 lines
274 B
Go
|
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
|
||
|
}
|