2019-11-08 06:53:40 +01:00
|
|
|
/*
|
|
|
|
This package contains the PhotoPrism REST api.
|
|
|
|
|
|
|
|
Additional information can be found in our Developer Guide:
|
|
|
|
|
|
|
|
https://github.com/photoprism/photoprism/wiki
|
|
|
|
*/
|
|
|
|
package api
|
|
|
|
|
2019-12-02 00:30:58 +01:00
|
|
|
import (
|
2020-05-27 19:38:40 +02:00
|
|
|
"github.com/photoprism/photoprism/internal/config"
|
2019-12-02 00:30:58 +01:00
|
|
|
"github.com/photoprism/photoprism/internal/event"
|
|
|
|
)
|
2019-11-08 06:53:40 +01:00
|
|
|
|
2019-12-02 00:30:58 +01:00
|
|
|
var log = event.Log
|
2020-05-25 19:10:44 +02:00
|
|
|
|
2020-05-28 16:26:22 +02:00
|
|
|
func logError(prefix string, err error) {
|
2020-05-25 19:10:44 +02:00
|
|
|
if err != nil {
|
|
|
|
log.Errorf("%s: %s", prefix, err.Error())
|
|
|
|
}
|
|
|
|
}
|
2020-05-27 19:38:40 +02:00
|
|
|
|
|
|
|
func UpdateClientConfig(conf *config.Config) {
|
|
|
|
event.Publish("config.updated", event.Data{"config": conf.ClientConfig()})
|
|
|
|
}
|