Skip to main content

assert_can_delete_notecard

Function assert_can_delete_notecard 

Source
pub async fn assert_can_delete_notecard(
    db: &SqlitePool,
    current_user: Uuid,
    notecard_id: Uuid,
) -> Result<NotecardRow, Error>
Expand description

Permission gate for deleting a notecard (same rule as renders).

ยงErrors

Returns Error::Forbidden if the user lacks delete permission; Error::NotFound if the notecard does not exist.