From: Dessalines Date: Wed, 1 Jul 2020 13:04:26 +0000 (-0400) Subject: Merge branch 'master' into federation X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/%22https:/nerdica.net/static/README.ja.md?a=commitdiff_plain;h=cd007febef64b980ddfeed157d097f0d23d452a4;p=lemmy.git Merge branch 'master' into federation --- cd007febef64b980ddfeed157d097f0d23d452a4 diff --cc docker/federation/docker-compose.yml index cbc648e6,d854e9d6..51a37b91 --- a/docker/federation/docker-compose.yml +++ b/docker/federation/docker-compose.yml @@@ -105,8 -110,13 +105,8 @@@ services - POSTGRES_DB=lemmy volumes: - ./volumes/postgres_gamma:/var/lib/postgresql/data - pictrs_gamma: - image: asonix/pictrs:v0.1.13-r0 - user: 991:991 - volumes: - - ./volumes/pictrs_gamma:/mnt iframely: - image: dogbin/iframely:latest + image: jolt/iframely:v1.4.3 volumes: - ../iframely.config.local.js:/iframely/config.local.js:ro diff --cc server/src/api/user.rs index e7c27def,8f09ea5f..a4e47e41 --- a/server/src/api/user.rs +++ b/server/src/api/user.rs @@@ -738,11 -710,10 +738,12 @@@ impl Perform for Oper return Err(APIError::err("not_an_admin").into()); } - match User_::ban_user(&conn, data.user_id, data.ban) { - Ok(user) => user, - Err(_e) => return Err(APIError::err("couldnt_update_user").into()), - }; + let ban = data.ban; - let ban_user = move |conn: &'_ _| User_::ban_user(conn, user_id, ban); ++ let banned_user_id = data.user_id; ++ let ban_user = move |conn: &'_ _| User_::ban_user(conn, banned_user_id, ban); + if blocking(pool, ban_user).await?.is_err() { + return Err(APIError::err("couldnt_update_user").into()); + } // Mod tables let expires = match data.expires {