From b707c277346f54422a53e25626d467e3f64cea16 Mon Sep 17 00:00:00 2001 From: Christoph Hagen Date: Fri, 24 Jun 2022 00:23:02 +0200 Subject: [PATCH] Fix version route --- Sources/App/routes.swift | 4 ++-- Training/config.sh | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 Training/config.sh diff --git a/Sources/App/routes.swift b/Sources/App/routes.swift index d9fb331..c8ef39a 100755 --- a/Sources/App/routes.swift +++ b/Sources/App/routes.swift @@ -14,8 +14,8 @@ private func authorize(_ request: Request) throws { func routes(_ app: Application) throws { - app.getCatching("version") { _ in - return "\(server.classifierVersion)" + app.get("version") { _ in + "\(server.classifierVersion)" } // Add or change a cap diff --git a/Training/config.sh b/Training/config.sh new file mode 100644 index 0000000..c1166b8 --- /dev/null +++ b/Training/config.sh @@ -0,0 +1,11 @@ +WORK_DIR="${HOME}/Projects/Caps/Caps-Server/Training" +BACKUP_DIR="./backup" +IMAGE_DIR="../Public/images" +MODEL_FILE="../Public/classifier.mlmodel" + +TRAINING_ITERATIONS="17" +SSH_PORT="5432" +SERVER="pi@christophhagen.de" +SERVER_ROOT_PATH="/data/servers/caps/Public" +SERVER_PATH="https://christophhagen.de/caps" +SERVER_AUTH="oakqhqiqeuenlakkiwjqfbvbykyquwie"