add: notifications for likes

TODO: notifications ui
This commit is contained in:
trisua 2025-03-29 23:51:13 -04:00
parent 6413ed09fb
commit 9dc75d7095
9 changed files with 292 additions and 27 deletions

View file

@ -1,5 +1,6 @@
pub mod auth;
pub mod communities;
pub mod notifications;
pub mod reactions;
use axum::{
@ -120,6 +121,16 @@ pub fn routes() -> Router {
"/auth/profile/find/{id}",
get(auth::profile::redirect_from_id),
)
// notifications
.route(
"/notifications/my",
delete(notifications::delete_all_request),
)
.route("/notifications/{id}", delete(notifications::delete_request))
.route(
"/notifications/{id}/read",
delete(notifications::update_read_status_request),
)
}
#[derive(Deserialize)]
@ -182,3 +193,8 @@ pub struct CreateReaction {
pub struct UpdateUserIsVerified {
pub is_verified: bool,
}
#[derive(Deserialize)]
pub struct UpdateNotificationRead {
pub read: bool,
}