aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel García <[email protected]>2021-03-15 16:42:20 +0100
committerDaniel García <[email protected]>2021-03-15 16:42:20 +0100
commit95e24ffc51db2f6834142ec86568c2d244562006 (patch)
treec3468a4291bf2e9f61c7c544fc68aae0558de151 /src
parent7436b454db5734a225afa88db96fcb62b187bb4d (diff)
downloadvaultwarden-95e24ffc51db2f6834142ec86568c2d244562006.tar.gz
vaultwarden-95e24ffc51db2f6834142ec86568c2d244562006.zip
rename send key -> akey
Diffstat (limited to 'src')
-rw-r--r--src/api/core/sends.rs2
-rw-r--r--src/db/models/send.rs8
-rw-r--r--src/db/schemas/mysql/schema.rs2
-rw-r--r--src/db/schemas/postgresql/schema.rs2
-rw-r--r--src/db/schemas/sqlite/schema.rs2
5 files changed, 8 insertions, 8 deletions
diff --git a/src/api/core/sends.rs b/src/api/core/sends.rs
index 6fc1dcbc..d14dc57d 100644
--- a/src/api/core/sends.rs
+++ b/src/api/core/sends.rs
@@ -325,7 +325,7 @@ fn put_send(id: String, data: JsonUpcase<SendData>, headers: Headers, conn: DbCo
}
send.data = data_str;
send.name = data.Name;
- send.key = data.Key;
+ send.akey = data.Key;
send.deletion_date = data.DeletionDate.naive_utc();
send.notes = data.Notes;
send.max_access_count = data.MaxAccessCount;
diff --git a/src/db/models/send.rs b/src/db/models/send.rs
index 674337ed..d7a7a872 100644
--- a/src/db/models/send.rs
+++ b/src/db/models/send.rs
@@ -22,7 +22,7 @@ db_object! {
pub atype: i32,
pub data: String,
- pub key: String,
+ pub akey: String,
pub password_hash: Option<Vec<u8>>,
password_salt: Option<Vec<u8>>,
password_iter: Option<i32>,
@@ -46,7 +46,7 @@ pub enum SendType {
}
impl Send {
- pub fn new(atype: i32, name: String, data: String, key: String, deletion_date: NaiveDateTime) -> Self {
+ pub fn new(atype: i32, name: String, data: String, akey: String, deletion_date: NaiveDateTime) -> Self {
let now = Utc::now().naive_utc();
Self {
@@ -59,7 +59,7 @@ impl Send {
atype,
data,
- key,
+ akey,
password_hash: None,
password_salt: None,
password_iter: None,
@@ -118,7 +118,7 @@ impl Send {
"Text": if self.atype == SendType::Text as i32 { Some(&data) } else { None },
"File": if self.atype == SendType::File as i32 { Some(&data) } else { None },
- "Key": self.key,
+ "Key": self.akey,
"MaxAccessCount": self.max_access_count,
"AccessCount": self.access_count,
"Password": self.password_hash.as_deref().map(|h| BASE64URL_NOPAD.encode(h)),
diff --git a/src/db/schemas/mysql/schema.rs b/src/db/schemas/mysql/schema.rs
index 7f1f4805..346b2959 100644
--- a/src/db/schemas/mysql/schema.rs
+++ b/src/db/schemas/mysql/schema.rs
@@ -111,7 +111,7 @@ table! {
notes -> Nullable<Text>,
atype -> Integer,
data -> Text,
- key -> Text,
+ akey -> Text,
password_hash -> Nullable<Binary>,
password_salt -> Nullable<Binary>,
password_iter -> Nullable<Integer>,
diff --git a/src/db/schemas/postgresql/schema.rs b/src/db/schemas/postgresql/schema.rs
index 3eb94518..f8e1e9fe 100644
--- a/src/db/schemas/postgresql/schema.rs
+++ b/src/db/schemas/postgresql/schema.rs
@@ -111,7 +111,7 @@ table! {
notes -> Nullable<Text>,
atype -> Integer,
data -> Text,
- key -> Text,
+ akey -> Text,
password_hash -> Nullable<Binary>,
password_salt -> Nullable<Binary>,
password_iter -> Nullable<Integer>,
diff --git a/src/db/schemas/sqlite/schema.rs b/src/db/schemas/sqlite/schema.rs
index 3eb94518..f8e1e9fe 100644
--- a/src/db/schemas/sqlite/schema.rs
+++ b/src/db/schemas/sqlite/schema.rs
@@ -111,7 +111,7 @@ table! {
notes -> Nullable<Text>,
atype -> Integer,
data -> Text,
- key -> Text,
+ akey -> Text,
password_hash -> Nullable<Binary>,
password_salt -> Nullable<Binary>,
password_iter -> Nullable<Integer>,