mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-23 11:21:32 +00:00
Changing docs formattin, running format.
This commit is contained in:
parent
09498d8bb3
commit
0ea4095238
2 changed files with 9 additions and 7 deletions
|
@ -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`.
|
||||
|
||||
|
|
|
@ -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),
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue