add: user follows, user blocks, ip bans

TODO: implement user following API endpoints
TODO: implement user blocking API endpoints
TODO: don't allow blocked users to interact with the users who blocked them
This commit is contained in:
trisua 2025-03-25 21:19:55 -04:00
parent 81005a6e1c
commit 559ce19932
25 changed files with 628 additions and 127 deletions

View file

@ -10,7 +10,7 @@ use rusqlite::Row;
use tokio_postgres::Row;
impl DataManager {
/// Get a [`Reaction`] from an SQL row.
/// Get a [`Notification`] from an SQL row.
pub(crate) fn get_notification_from_row(
#[cfg(feature = "sqlite")] x: &Row<'_>,
#[cfg(feature = "postgres")] x: &Row,
@ -41,7 +41,7 @@ impl DataManager {
);
if res.is_err() {
return Err(Error::GeneralNotFound("reactions".to_string()));
return Err(Error::GeneralNotFound("notification".to_string()));
}
Ok(res.unwrap())