From: Dessalines Date: Mon, 2 Nov 2020 03:26:00 +0000 (-0600) Subject: Changing docs formattin, running format. X-Git-Url: http://these/git/%22%7Burl%7D/%7B%60%24%7BghostArchiveUrl%7D/static/%7BpictshareAvatarThumbnail%28post.creator_avatar%29%7D?a=commitdiff_plain;h=0ea409523853d0a56858eeba1b84cc18ad61866a;p=lemmy.git Changing docs formattin, running format. --- diff --git a/docs/src/administration_configuration.md b/docs/src/administration_configuration.md index cfda34f7..48e32fdd 100644 --- a/docs/src/administration_configuration.md +++ b/docs/src/administration_configuration.md @@ -4,8 +4,8 @@ The configuration is based on the file [defaults.hjson](https://yerbamate.dev/Le The `defaults.hjson` and `config.hjson` files are located at `config/defaults.hjson` and`config/config.hjson`, respectively. To change these default locations, you can set these two environment variables: - LEMMY_CONFIG_LOCATION # config.hjson - LEMMY_CONFIG_DEFAULTS_LOCATION # defaults.hjson +- LEMMY_CONFIG_LOCATION # config.hjson +- LEMMY_CONFIG_DEFAULTS_LOCATION # defaults.hjson Additionally, you can override any config files with environment variables. These have the same name as the config options, and are prefixed with `LEMMY_`. For example, you can override the `database.password` with `LEMMY_DATABASE__POOL_SIZE=10`. diff --git a/lemmy_api/src/user.rs b/lemmy_api/src/user.rs index 1d5aa19a..ad3d9808 100644 --- a/lemmy_api/src/user.rs +++ b/lemmy_api/src/user.rs @@ -493,12 +493,14 @@ impl Perform for GetUserDetails { // if there's a logged in user and it's the same id as the user whose details are being // requested we need to use get_user_dangerous so it returns their email or other sensitive // data hidden when viewing users other than yourself - Some(auth_user_id) => if user_details_id == auth_user_id { - UserView::get_user_dangerous(conn, auth_user_id) - } else { - UserView::get_user_secure(conn, user_details_id) + Some(auth_user_id) => { + if user_details_id == auth_user_id { + UserView::get_user_dangerous(conn, auth_user_id) + } else { + UserView::get_user_secure(conn, user_details_id) + } } - None => UserView::get_user_secure(conn, user_details_id) + None => UserView::get_user_secure(conn, user_details_id), } };