From b1285acd2ddc7656855204a0bbe9e9c3698d8ba4 Mon Sep 17 00:00:00 2001 From: EdwinBetanc0urt Date: Sun, 9 Jun 2024 22:20:43 -0400 Subject: [PATCH] revert some changes. --- README.md | 44 ++++++++++++++++++++----------------------- docker/Dockerfile | 11 +---------- src/bin/server.rs | 48 +++++++++++++++++++++++------------------------ 3 files changed, 45 insertions(+), 58 deletions(-) diff --git a/README.md b/README.md index fb7996e..9d766fa 100644 --- a/README.md +++ b/README.md @@ -106,35 +106,31 @@ INFO [server] Server Address: "0.0.0.0:7878" └──api ├──[OPTIONS] -> server::options_response ├──[GET] -> server::get_system_info - ├──security/menus - │ ├──[OPTIONS] -> server::options_response - │ └──[GET] -> server::get_menu └──dictionary + ├──browsers/ + │ ├──[OPTIONS] -> server::get_browsers + │ └──[GET] -> server::get_browsers ├──browsers - │ ├──[OPTIONS] -> server::options_response - │ ├──[GET] -> server::get_browsers - │ └── - │ ├──[OPTIONS] -> server::options_response - │ └──[GET] -> server::get_browsers + │ ├──[OPTIONS] -> server::get_browsers + │ └──[GET] -> server::get_browsers + ├──forms/ + │ ├──[OPTIONS] -> server::get_forms + │ └──[GET] -> server::get_forms ├──forms - │ ├──[OPTIONS] -> server::options_response - │ ├──[GET] -> server::get_forms - │ └── - │ ├──[OPTIONS] -> server::options_response - │ └──[GET] -> server::get_forms + │ ├──[OPTIONS] -> server::get_forms + │ └──[GET] -> server::get_forms + ├──processes/ + │ ├──[OPTIONS] -> server::get_process + │ └──[GET] -> server::get_process ├──processes - │ ├──[OPTIONS] -> server::options_response - │ ├──[GET] -> server::get_process - │ └── - │ ├──[OPTIONS] -> server::options_response - │ └──[GET] -> server::get_process + │ ├──[OPTIONS] -> server::get_process + │ └──[GET] -> server::get_process + ├──windows/ + │ ├──[OPTIONS] -> server::get_windows + │ └──[GET] -> server::get_windows └──windows - ├──[OPTIONS] -> server::options_response - ├──[GET] -> server::get_windows - └── - ├──[OPTIONS] -> server::options_response - └──[GET] -> server::get_windows - + ├──[OPTIONS] -> server::get_windows + └──[GET] -> server::get_windows INFO [server] Kafka Consumer is enabled INFO [server] Kafka queue: "0.0.0.0:29092" INFO [server] Topics to Subscribed: ["menu", "browser", "form", "process", "window"] diff --git a/docker/Dockerfile b/docker/Dockerfile index 1b190d4..c6ba1ba 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -13,7 +13,7 @@ RUN apt-get update && apt-get install -y pkg-config libssl-dev && rm -rf /var/li cargo install --config net.git-fetch-with-cli=true --path . && \ mv docker/.env /usr/local/cargo/bin/ -FROM debian:bullseye-20240513 +FROM debian:bullseye-20240423 ENV \ RUST_LOG="info" \ @@ -48,13 +48,4 @@ RUN apt-get update && \ echo "Set Timezone..." && \ echo $TZ > /etc/timezone -RUN addgroup adempiere && \ - adduser --disabled-password --gecos "" --ingroup adempiere --no-create-home adempiere && \ - chown -R adempiere /opt/apps/server/ && \ - chmod +x /usr/local/bin/server && \ - echo "Set Timezone..." && \ - echo $TZ > /etc/timezone - -USER adempiere - CMD ["server"] diff --git a/src/bin/server.rs b/src/bin/server.rs index df3fa4a..1406012 100644 --- a/src/bin/server.rs +++ b/src/bin/server.rs @@ -58,53 +58,53 @@ async fn main() { .push( // /api/dictionary Router::with_path("dictionary") + .push( + // /api/dictionary/browsers/:id + Router::with_path("browsers/") + .options(options_response) + .get(get_browsers) + ) .push( // /api/dictionary/browsers/ Router::with_path("browsers") .options(options_response) .get(get_browsers) - .push( - // /api/dictionary/browsers/:id - Router::with_path("") - .options(options_response) - .get(get_browsers) - ) + ) + .push( + // /api/dictionary/forms/:id + Router::with_path("forms/") + .options(options_response) + .get(get_forms) ) .push( // /api/dictionary/forms/ Router::with_path("forms") .options(options_response) .get(get_forms) - .push( - // /api/dictionary/forms/:id - Router::with_path("") - .options(options_response) - .get(get_forms) - ) ) + .push( + // /api/dictionary/processes/:id + Router::with_path("processes/") + .options(options_response) + .get(get_process) + ) .push( // /api/dictionary/processes Router::with_path("processes") .options(options_response) .get(get_process) - .push( - // /api/dictionary/processes/:id - Router::with_path("") - .options(options_response) - .get(get_process) - ) + ) + .push( + // /api/dictionary/windows/:id + Router::with_path("windows/") + .options(options_response) + .get(get_windows) ) .push( // /api/dictionary/windows/ Router::with_path("windows") .options(options_response) .get(get_windows) - .push( - // /api/dictionary/windows/:id - Router::with_path("") - .options(options_response) - .get(get_windows) - ) ) ) )