From 41aa943c7837ad4f583873fcff480cffe918c794 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kris=20N=C3=B3va?= Date: Wed, 3 Feb 2021 17:01:38 -0800 Subject: [PATCH] Adding additional resources for testing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kris NĂ³va --- examples/app_upload_download_photo.go | 4 ++++ examples/download_photo.go | 3 ++- sample-app/pcreate | 6 +++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/examples/app_upload_download_photo.go b/examples/app_upload_download_photo.go index d4f2568..9da911d 100644 --- a/examples/app_upload_download_photo.go +++ b/examples/app_upload_download_photo.go @@ -9,6 +9,10 @@ func main() { logger.Level = 4 app := sampleapp.New() var err error + err = app.Create() + if err != nil { + logger.Critical(err.Error()) + } err = app.Start() if err != nil { logger.Critical(err.Error()) diff --git a/examples/download_photo.go b/examples/download_photo.go index 811594f..c02e9bd 100644 --- a/examples/download_photo.go +++ b/examples/download_photo.go @@ -8,7 +8,7 @@ import ( ) func main() { - uuid := os.Getenv("PHOTOPRISM_ID") + uuid := os.Getenv("PHOTOPRISM_UUID") if uuid == "" { halt(2, "Missing PHOTOPRISM_UUID") } @@ -17,5 +17,6 @@ func main() { if err != nil { halt(3, "Error fetching photo: %v", err) } + fmt.Println(*photo) } diff --git a/sample-app/pcreate b/sample-app/pcreate index 556c164..be4a764 100755 --- a/sample-app/pcreate +++ b/sample-app/pcreate @@ -1,3 +1,4 @@ + #!/bin/bash #################################### ##### @@ -8,4 +9,7 @@ # Startup Script for the Application #################################### echo "Creating [SampleApp]" -docker run -d --name photoprism -p 8080:2342 -e PHOTOPRISM_UPLOAD_NSFW="true" -e PHOTOPRISM_ADMIN_PASSWORD="missy" -v "/home/nova/go/src/github.com/kris-nova/client-go/sample-app/photoprism":"/photoprism" photoprism/photoprism + +docker run -d --name photoprism -p 8080:2342 -e PHOTOPRISM_UPLOAD_NSFW="true" -e PHOTOPRISM_ADMIN_PASSWORD="missy" -v photoprism:/photoprism photoprism/photoprism:latest + +