Send create, update and delete notifications for Sends in the correct format.

Add endpoints to get all sends or a specific send by its uuid.
This commit is contained in:
Fabian Thies
2021-08-03 17:33:59 +02:00
parent c666497130
commit dd98fe860b
3 changed files with 58 additions and 10 deletions

View File

@ -232,15 +232,18 @@ impl Send {
}
}
pub fn update_users_revision(&self, conn: &DbConn) {
match &self.user_uuid {
Some(user_uuid) => {
pub fn update_users_revision(&self, conn: &DbConn) -> Vec<String> {
let mut user_uuids = Vec::new();
match self.user_uuid {
Some(ref user_uuid) => {
User::update_uuid_revision(user_uuid, conn);
user_uuids.push(user_uuid.clone())
}
None => {
// Belongs to Organization, not implemented
}
}
};
user_uuids
}
pub fn delete_all_by_user(user_uuid: &str, conn: &DbConn) -> EmptyResult {