pub fn mark_all_read(&self, receiver_id: ID, state: bool) -> Result<()> {
        use crate::schema::notifs::{self, dsl};

        diesel::update(dsl::notifs.filter(dsl::receiver_id.eq(receiver_id)))
            .set(dsl::read.eq(state))
            .execute(self.db)?;

        Ok(())
    }
/// Mark all as read or unread notif
Mark all as read or unread notif
Mark all as read or unread notif
pub fn mark_all_read(&self, receiver_id: ID, state: bool) -> Result<()> {
        use crate::schema::notifs::{self, dsl};
        diesel::update(dsl::notifs.filter(dsl::receiver_id.eq(receiver_id)))
            .set(dsl::read.eq(state))
            .execute(self.db)?;
        Ok(())
    }
pub fn mark_all_read ( & self , receiver_id : ID , state : bool ) -> Result < ( ) > { use crate :: schema :: notifs :: { self , dsl } ; diesel :: update ( dsl :: notifs . filter ( dsl :: receiver_id . eq ( receiver_id ) ) ) . set ( dsl :: read . eq ( state ) ) . execute ( self . db ) ? ; Ok ( ( ) ) }
Mark all as read or unread notif
Mark all as read or unread notif
&self
receiver_id
ID
state
bool
&self
receiver_id
ID
state
bool