Add notify module and update notification SQL query: Introduced a new notify module for handling notifications. Updated the SQL query in insert_notification_conn to use QUERY_INSERT_NOTIFICATION instead of QUERY_INSERT_NOTIFICATION_FULL, simplifying the notification insertion process.
All checks were successful
Deploy yourpart (blue-green) / deploy (push) Successful in 1m45s
All checks were successful
Deploy yourpart (blue-green) / deploy (push) Successful in 1m45s
This commit is contained in:
@@ -18,6 +18,7 @@ mod falukant_servants;
|
||||
mod falukant_debtors;
|
||||
mod falukant_transport_raid;
|
||||
mod political_benefits;
|
||||
mod notify;
|
||||
mod sql;
|
||||
|
||||
pub use base::Worker;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use crate::db::{ConnectionPool, DbConnection, DbError};
|
||||
use crate::message_broker::MessageBroker;
|
||||
use crate::worker::sql::QUERY_INSERT_NOTIFICATION_FULL;
|
||||
use crate::worker::sql::QUERY_INSERT_NOTIFICATION;
|
||||
|
||||
/// Schreibt eine Notification in `falukant_log.notification`.
|
||||
///
|
||||
@@ -25,12 +25,12 @@ pub fn insert_notification_conn(
|
||||
conn: &mut DbConnection,
|
||||
user_id: i32,
|
||||
tr: &str,
|
||||
character_id: Option<i32>,
|
||||
_character_id: Option<i32>,
|
||||
) -> Result<(), DbError> {
|
||||
conn.prepare("insert_notification_full", QUERY_INSERT_NOTIFICATION_FULL)?;
|
||||
conn.prepare("insert_notification_full", QUERY_INSERT_NOTIFICATION)?;
|
||||
conn.execute(
|
||||
"insert_notification_full",
|
||||
&[&user_id, &tr, &character_id],
|
||||
&[&user_id, &tr],
|
||||
)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user