Improved error messagees, implemented delete ciphers, attachments and account, implemented two factor recovery.

Known missing:
 - import ciphers, create ciphers types other than login and card, update ciphers
 - clear and put device_tokens
 - Equivalent domains
 - Organizations
This commit is contained in:
Daniel García
2018-02-15 19:05:57 +01:00
parent 47a116bbee
commit 84a75c871b
15 changed files with 181 additions and 192 deletions

View File

@@ -63,6 +63,10 @@ impl Attachment {
}
pub fn delete(self, conn: &DbConn) -> bool {
use util;
util::delete_file(&self.get_file_path());
match diesel::delete(attachments::table.filter(
attachments::id.eq(self.id)))
.execute(&**conn) {