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`.
// 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),
}
};