1
0
Fork 1
Spiegel von https://github.com/dani-garcia/vaultwarden.git synchronisiert 2024-11-29 06:20:29 +01:00

Merge pull request #111 from krankur/beta

Implemented PUT for single cipher sharing (#97)
Dieser Commit ist enthalten in:
Daniel García 2018-08-01 21:12:48 +02:00 committet von GitHub
Commit 54afe0671e
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
2 geänderte Dateien mit 6 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -365,6 +365,11 @@ fn post_cipher_share(uuid: String, data: JsonUpcase<ShareCipherData>, headers: H
} }
} }
#[put("/ciphers/<uuid>/share", data = "<data>")]
fn put_cipher_share(uuid: String, data: JsonUpcase<ShareCipherData>, headers: Headers, conn: DbConn) -> JsonResult {
post_cipher_share(uuid, data, headers, conn)
}
#[post("/ciphers/<uuid>/attachment", format = "multipart/form-data", data = "<data>")] #[post("/ciphers/<uuid>/attachment", format = "multipart/form-data", data = "<data>")]
fn post_attachment(uuid: String, data: Data, content_type: &ContentType, headers: Headers, conn: DbConn) -> JsonResult { fn post_attachment(uuid: String, data: Data, content_type: &ContentType, headers: Headers, conn: DbConn) -> JsonResult {
let cipher = match Cipher::find_by_uuid(&uuid, &conn) { let cipher = match Cipher::find_by_uuid(&uuid, &conn) {

Datei anzeigen

@ -41,6 +41,7 @@ pub fn routes() -> Vec<Route> {
delete_attachment, delete_attachment,
post_cipher_admin, post_cipher_admin,
post_cipher_share, post_cipher_share,
put_cipher_share,
post_cipher, post_cipher,
put_cipher, put_cipher,
delete_cipher_post, delete_cipher_post,