vw_small

Hardened fork of Vaultwarden (https://github.com/dani-garcia/vaultwarden) with fewer features.
git clone https://git.philomathiclife.com/repos/vw_small
Log | Files | Refs | README

commit dfdf4473ea89087a5d055a7d9fdcda62fa727c58
parent 8bbbff7567e611e1366e981de988f5249c6a8a0d
Author: theycallmesteve <59837464+theycallmesteve@users.noreply.github.com>
Date:   Fri,  8 May 2020 13:36:35 -0400

Rename to_json_list to to_json_provder to reflect the response model

Diffstat:
Msrc/api/core/two_factor/mod.rs | 2+-
Msrc/db/models/two_factor.rs | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/api/core/two_factor/mod.rs b/src/api/core/two_factor/mod.rs @@ -38,7 +38,7 @@ pub fn routes() -> Vec<Route> { #[get("/two-factor")] fn get_twofactor(headers: Headers, conn: DbConn) -> JsonResult { let twofactors = TwoFactor::find_by_user(&headers.user.uuid, &conn); - let twofactors_json: Vec<Value> = twofactors.iter().map(TwoFactor::to_json_list).collect(); + let twofactors_json: Vec<Value> = twofactors.iter().map(TwoFactor::to_json_provider).collect(); Ok(Json(json!({ "Data": twofactors_json, diff --git a/src/db/models/two_factor.rs b/src/db/models/two_factor.rs @@ -59,7 +59,7 @@ impl TwoFactor { }) } - pub fn to_json_list(&self) -> Value { + pub fn to_json_provider(&self) -> Value { json!({ "Enabled": self.enabled, "Type": self.atype,