From 15adcb9aafda4a616c7a4f9483ba0d495fac7098 Mon Sep 17 00:00:00 2001 From: Jose Celano Date: Wed, 2 Oct 2024 09:17:19 +0100 Subject: [PATCH 1/3] docs: [#738] fix command --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 057a4bc7..e2934921 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -112,7 +112,7 @@ //! && mkdir -p ./storage/database //! ``` //! -//! Then you can run it with: `./target/release/main` +//! Then you can run it with: `./target/release/torrust-index` //! //! ## Run with docker //! From fdf62e9b3ed054fa236966e08e62dfa9cd0a2975 Mon Sep 17 00:00:00 2001 From: Jose Celano Date: Wed, 2 Oct 2024 09:20:44 +0100 Subject: [PATCH 2/3] docs: [#739] fix command to run with docker --- src/lib.rs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index e2934921..13586a17 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -119,13 +119,21 @@ //! You can run the index with a pre-built docker image: //! //! ```text -//! mkdir -p ./storage/database \ +//! cd /tmp \ +//! && mkdir torrust-index \ +//! && cd torrust-index \ +//! && mkdir -p ./storage/index/lib/database \ +//! && mkdir -p ./storage/index/log \ +//! && mkdir -p ./storage/index/etc \ +//! && sqlite3 "./storage/index/lib/database/sqlite3.db" "VACUUM;" \ //! && export USER_ID=1000 \ //! && docker run -it \ -//! --user="$USER_ID" \ +//! --env USER_ID="$USER_ID" \ //! --publish 3001:3001/tcp \ -//! --volume "$(pwd)/storage":"/app/storage" \ -//! torrust/index +//! --volume "$(pwd)/storage/index/lib":"/var/lib/torrust/index" \ +//! --volume "$(pwd)/storage/index/log":"/var/log/torrust/index" \ +//! --volume "$(pwd)/storage/index/etc":"/etc/torrust/index" \ +//! torrust/index:develop //! ``` //! //! For more information about using docker visit the [tracker docker documentation](https://github.com/torrust/torrust-index/tree/develop/docker). From 7f605b136750ab9e40979156d5be4cc267db2de6 Mon Sep 17 00:00:00 2001 From: Jose Celano Date: Wed, 2 Oct 2024 09:33:32 +0100 Subject: [PATCH 3/3] fix: clippy errors --- src/services/authorization.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/services/authorization.rs b/src/services/authorization.rs index 2861ddd9..e6678ac1 100644 --- a/src/services/authorization.rs +++ b/src/services/authorization.rs @@ -74,7 +74,6 @@ impl Service { /// /// Will return an error if: /// - The user is not authorized to perform the action. - pub async fn authorize(&self, action: ACTION, maybe_user_id: Option) -> std::result::Result<(), ServiceError> { let role = self.get_role(maybe_user_id).await;