diff options
author | Fabian Thies <[email protected]> | 2021-08-03 17:33:59 +0200 |
---|---|---|
committer | Fabian Thies <[email protected]> | 2021-08-03 17:39:38 +0200 |
commit | dd98fe860b33f8e34c161f49e3f6b07908d1dc3e (patch) | |
tree | 1aa36100f56a53a3fdb84b8f634d1edad54d61ff /src/db/models/send.rs | |
parent | c6664971300a360a82b42db1bcf0a7d883717fff (diff) | |
download | vaultwarden-dd98fe860b33f8e34c161f49e3f6b07908d1dc3e.tar.gz vaultwarden-dd98fe860b33f8e34c161f49e3f6b07908d1dc3e.zip |
Send create, update and delete notifications for `Send`s in the correct format.
Add endpoints to get all sends or a specific send by its uuid.
Diffstat (limited to 'src/db/models/send.rs')
-rw-r--r-- | src/db/models/send.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/db/models/send.rs b/src/db/models/send.rs index 1fae40c8..05d366e4 100644 --- a/src/db/models/send.rs +++ b/src/db/models/send.rs @@ -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 { |