diff --git a/core/src/api/tags.rs b/core/src/api/tags.rs index 2530562a1..3406dafba 100644 --- a/core/src/api/tags.rs +++ b/core/src/api/tags.rs @@ -358,6 +358,13 @@ pub(crate) fn mount() -> AlphaRouter { "delete", R.with2(library()) .mutation(|(_, library), tag_id: i32| async move { + library + .db + .tag_on_object() + .delete_many(vec![tag_on_object::tag_id::equals(tag_id)]) + .exec() + .await?; + library .db .tag()