Finished work on ciphers (import, update, and the missing types)

This commit is contained in:
Daniel García
2018-02-16 00:32:26 +01:00
parent 84a75c871b
commit 7a3308200a
4 changed files with 113 additions and 62 deletions

View File

@ -94,6 +94,10 @@ fn delete_folder(uuid: String, headers: Headers, conn: DbConn) -> Result<(), Bad
err!("Folder belongs to another user")
}
if !Cipher::find_by_folder(&folder.uuid, &conn).is_empty() {
err!("Folder is not empty")
}
folder.delete(&conn);
Ok(())