cox not allowed to set always_show; cargo clippy

This commit is contained in:
2024-09-02 12:18:23 +03:00
parent 0645103466
commit 99a49dbec9
11 changed files with 139 additions and 42 deletions

View File

@ -131,13 +131,13 @@ async fn new_blogpost(
blogpost: Form<NewBlogpostForm<'_>>,
config: &State<Config>,
) -> String {
if blogpost.pw == &config.wordpress_key {
let member = Role::find_by_name(&db, "Donau Linz").await.unwrap();
if blogpost.pw == config.wordpress_key {
let member = Role::find_by_name(db, "Donau Linz").await.unwrap();
Notification::create_for_role(
db,
&member,
&urlencoding::decode(blogpost.article_title).expect("UTF-8"),
&format!("Neuer Blogpost"),
"Neuer Blogpost",
Some(blogpost.article_url),
None,
)
@ -160,9 +160,9 @@ async fn blogpost_unpublished(
blogpost: Form<BlogpostUnpublishedForm<'_>>,
config: &State<Config>,
) -> String {
if blogpost.pw == &config.wordpress_key {
if blogpost.pw == config.wordpress_key {
Notification::delete_by_link(
&db,
db,
&urlencoding::decode(blogpost.article_url).expect("UTF-8"),
)
.await;