Adding initial changes for the evening - we have compiling code and some light scaffolding with the client and internal libraries
Signed-off-by: Kris Nóva <kris@nivenly.com>
This commit is contained in:
parent
0f880ac1fa
commit
ef15a0ac15
6 changed files with 16 additions and 357 deletions
0
api/v1/client.go
Normal file
0
api/v1/client.go
Normal file
0
api/v1/file.go
Normal file
0
api/v1/file.go
Normal file
0
api/v1/meta.go
Normal file
0
api/v1/meta.go
Normal file
|
@ -2,7 +2,6 @@ package api
|
|||
|
||||
import (
|
||||
"net/http"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/photoprism/photoprism/internal/acl"
|
||||
|
@ -12,29 +11,10 @@ import (
|
|||
"github.com/photoprism/photoprism/internal/i18n"
|
||||
"github.com/photoprism/photoprism/internal/photoprism"
|
||||
"github.com/photoprism/photoprism/internal/query"
|
||||
"github.com/photoprism/photoprism/internal/service"
|
||||
"github.com/photoprism/photoprism/pkg/fs"
|
||||
"github.com/photoprism/photoprism/pkg/txt"
|
||||
)
|
||||
|
||||
// SavePhotoAsYaml saves photo data as YAML file.
|
||||
func SavePhotoAsYaml(p entity.Photo) {
|
||||
c := service.Config()
|
||||
|
||||
// Write YAML sidecar file (optional).
|
||||
if !c.BackupYaml() {
|
||||
return
|
||||
}
|
||||
|
||||
fileName := p.YamlFileName(c.OriginalsPath(), c.SidecarPath())
|
||||
|
||||
if err := p.SaveAsYaml(fileName); err != nil {
|
||||
log.Errorf("photo: %s (update yaml)", err)
|
||||
} else {
|
||||
log.Debugf("photo: updated yaml file %s", txt.Quote(filepath.Base(fileName)))
|
||||
}
|
||||
}
|
||||
|
||||
// GET /api/v1/photos/:uid
|
||||
//
|
||||
// Parameters:
|
Loading…
Add table
Add a link
Reference in a new issue