0
0
Fork 0
mirror of https://github.com/dani-garcia/vaultwarden synced 2024-12-14 01:23:55 +01:00

Add create endpoint, fixes #253, fixes #261

This commit is contained in:
Daniel García 2018-11-19 20:27:49 +01:00
parent 1d4944b88e
commit 00abd4c853
No known key found for this signature in database
GPG key ID: FC8A7D14C3CD543A
2 changed files with 5 additions and 0 deletions

View file

@ -143,7 +143,11 @@ fn post_ciphers_admin(data: JsonUpcase<ShareCipherData>, headers: Headers, conn:
};
share_cipher_by_uuid(&cipher.uuid, data, &headers, &conn, &ws)
}
#[post("/ciphers/create", data = "<data>")]
fn post_ciphers_create(data: JsonUpcase<ShareCipherData>, headers: Headers, conn: DbConn, ws: State<WebSocketUsers>) -> JsonResult {
post_ciphers_admin(data, headers, conn, ws)
}
#[post("/ciphers", data = "<data>")]

View file

@ -39,6 +39,7 @@ pub fn routes() -> Vec<Route> {
post_ciphers,
put_cipher_admin,
post_ciphers_admin,
post_ciphers_create,
post_ciphers_import,
post_attachment,
post_attachment_admin,