1
0
Fork 1
Spiegel von https://github.com/dani-garcia/vaultwarden.git synchronisiert 2024-06-28 18:25:41 +02:00

Rename to_json_list to to_json_provder to reflect the response model

Dieser Commit ist enthalten in:
theycallmesteve 2020-05-08 13:36:35 -04:00
Ursprung 8bbbff7567
Commit dfdf4473ea
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6240923F65CC698D
2 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -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,

Datei anzeigen

@ -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,