From: Dessalines Date: Mon, 15 Mar 2021 22:18:50 +0000 (-0400) Subject: Removing some TODOS. X-Git-Url: http://these/git/%7B%60%24%7BarchiveTodayUrl%7D/%24%7B%60data:application/static/%24%7Bargs.thread.url%7D?a=commitdiff_plain;h=270ce539bf3ebbd85a7929edacbc9ffb52e5ea26;p=lemmy.git Removing some TODOS. --- diff --git a/crates/api/src/lib.rs b/crates/api/src/lib.rs index 21afcee2..aebabde8 100644 --- a/crates/api/src/lib.rs +++ b/crates/api/src/lib.rs @@ -72,15 +72,6 @@ pub(crate) async fn is_mod_or_admin( Ok(()) } -// TODO this probably isn't necessary anymore -// pub async fn is_admin(pool: &DbPool, person_id: i32) -> Result<(), LemmyError> { -// let user = blocking(pool, move |conn| LocalUser::read(conn, person_id)).await??; -// if !user.admin { -// return Err(ApiError::err("not_an_admin").into()); -// } -// Ok(()) -// } - pub fn is_admin(local_user_view: &LocalUserView) -> Result<(), LemmyError> { if !local_user_view.local_user.admin { return Err(ApiError::err("not_an_admin").into()); diff --git a/crates/api_structs/src/lib.rs b/crates/api_structs/src/lib.rs index e0fab6b2..e25b0579 100644 --- a/crates/api_structs/src/lib.rs +++ b/crates/api_structs/src/lib.rs @@ -68,7 +68,6 @@ pub async fn send_local_notifs( Ok(ids) } -// TODO should this really use person_ids as recipient ids? or local_user_ids ? fn do_send_local_notifs( conn: &PgConnection, mentions: &[MentionData], @@ -85,7 +84,6 @@ fn do_send_local_notifs( .filter(|m| m.is_local() && m.name.ne(&person.name)) .collect::>() { - // TODO do a local user fetch if let Ok(mention_user_view) = LocalUserView::read_from_name(&conn, &mention.name) { // TODO // At some point, make it so you can't tag the parent creator either