Add a way to delete articles

Fixes #116
This commit is contained in:
Bat
2018-09-01 16:28:47 +01:00
parent 70ef4d6a74
commit cea548b821
12 changed files with 103 additions and 53 deletions
+5 -4
View File
@@ -1,4 +1,4 @@
use activitypub::{Object, activity::Create};
use activitypub::{Object, activity::{Create, Delete}};
use activity_pub::Id;
@@ -29,9 +29,10 @@ pub trait Notify<C> {
fn notify(&self, conn: &C);
}
pub trait Deletable<C> {
/// true if success
fn delete_activity(conn: &C, id: Id) -> bool;
pub trait Deletable<C, A> {
fn delete(&self, conn: &C) -> A;
fn delete_id(id: String, conn: &C);
}
pub trait WithInbox {