From 2a1d0737a0637b41b7283211d14707fb31e2a8de Mon Sep 17 00:00:00 2001 From: Joe Bellus Date: Sat, 12 Feb 2022 02:42:32 -0500 Subject: [PATCH] Fixed setup errors and removed openssl installs Fixed errors during setup Removed SSL install from CI pipeline for x86 builds --- .gitlab-ci.yml | 4 ---- src/error.rs | 2 +- src/ui/views/Dashboard.vue | 8 ++++---- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 22fb8c4..a62fe1d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,8 +12,6 @@ test: script: - mkdir dist - touch dist/index.html - - apt-get update - - apt-get -y install pkg-config - cargo test build-ui: @@ -40,8 +38,6 @@ build-x64-bin: rules: - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH script: - - apt-get update - - apt-get -y install libssl-dev pkg-config - cargo build --release - cd target/release - tar -czf ../../vade-linux-x64.tar.gz vade diff --git a/src/error.rs b/src/error.rs index 475a2e7..008bb95 100644 --- a/src/error.rs +++ b/src/error.rs @@ -62,7 +62,7 @@ impl actix_web::error::ResponseError for Error { fn status_code(&self) -> actix_web::http::StatusCode { match self.code { ErrorCode::UnAuthorized => StatusCode::UNAUTHORIZED, - ErrorCode::NoSetup => StatusCode::OK, + ErrorCode::NoSetup => StatusCode::UPGRADE_REQUIRED, _ => StatusCode::INTERNAL_SERVER_ERROR, } } diff --git a/src/ui/views/Dashboard.vue b/src/ui/views/Dashboard.vue index 874577c..4027bfe 100644 --- a/src/ui/views/Dashboard.vue +++ b/src/ui/views/Dashboard.vue @@ -191,14 +191,14 @@ export default { } }, async reload() { - this.applications = (await axios.get("/api/applications")).data.items; + this.applications = (await axios.get("/api/applications")).data.items || []; this.applicationCategories = ( await axios.get("/api/application_categories") - ).data.items; - this.bookmarks = (await axios.get("/api/bookmarks")).data.items; + ).data.items || []; + this.bookmarks = (await axios.get("/api/bookmarks")).data.items || []; this.bookmarkCategories = ( await axios.get("/api/bookmark_categories") - ).data.items; + ).data.items || []; this.editApp = {}; this.editAppCat = {};