aboutsummaryrefslogtreecommitdiff
path: root/src/api/web.rs
diff options
context:
space:
mode:
authorJake Howard <[email protected]>2021-03-31 21:18:35 +0100
committerJake Howard <[email protected]>2021-03-31 21:18:35 +0100
commit0af3956abd2ff9b550130716e41fc14088dac84c (patch)
tree4554f017b29df0b66b9f544cc75030d7eed5d1f3 /src/api/web.rs
parent15feff3e79b319dcbfd2d775d5521896a6068bc6 (diff)
downloadvaultwarden-0af3956abd2ff9b550130716e41fc14088dac84c.tar.gz
vaultwarden-0af3956abd2ff9b550130716e41fc14088dac84c.zip
Run `cargo fmt` on codebase
Diffstat (limited to 'src/api/web.rs')
-rw-r--r--src/api/web.rs50
1 files changed, 40 insertions, 10 deletions
diff --git a/src/api/web.rs b/src/api/web.rs
index 90e572a8..5d2048ea 100644
--- a/src/api/web.rs
+++ b/src/api/web.rs
@@ -76,18 +76,48 @@ fn alive() -> Json<String> {
#[get("/bwrs_static/<filename>")]
fn static_files(filename: String) -> Result<Content<&'static [u8]>, Error> {
match filename.as_ref() {
- "mail-github.png" => Ok(Content(ContentType::PNG, include_bytes!("../static/images/mail-github.png"))),
- "logo-gray.png" => Ok(Content(ContentType::PNG, include_bytes!("../static/images/logo-gray.png"))),
- "shield-white.png" => Ok(Content(ContentType::PNG, include_bytes!("../static/images/shield-white.png"))),
- "error-x.svg" => Ok(Content(ContentType::SVG, include_bytes!("../static/images/error-x.svg"))),
+ "mail-github.png" => Ok(Content(
+ ContentType::PNG,
+ include_bytes!("../static/images/mail-github.png"),
+ )),
+ "logo-gray.png" => Ok(Content(
+ ContentType::PNG,
+ include_bytes!("../static/images/logo-gray.png"),
+ )),
+ "shield-white.png" => Ok(Content(
+ ContentType::PNG,
+ include_bytes!("../static/images/shield-white.png"),
+ )),
+ "error-x.svg" => Ok(Content(
+ ContentType::SVG,
+ include_bytes!("../static/images/error-x.svg"),
+ )),
"hibp.png" => Ok(Content(ContentType::PNG, include_bytes!("../static/images/hibp.png"))),
- "bootstrap.css" => Ok(Content(ContentType::CSS, include_bytes!("../static/scripts/bootstrap.css"))),
- "bootstrap-native.js" => Ok(Content(ContentType::JavaScript, include_bytes!("../static/scripts/bootstrap-native.js"))),
- "identicon.js" => Ok(Content(ContentType::JavaScript, include_bytes!("../static/scripts/identicon.js"))),
- "datatables.js" => Ok(Content(ContentType::JavaScript, include_bytes!("../static/scripts/datatables.js"))),
- "datatables.css" => Ok(Content(ContentType::CSS, include_bytes!("../static/scripts/datatables.css"))),
- "jquery-3.5.1.slim.js" => Ok(Content(ContentType::JavaScript, include_bytes!("../static/scripts/jquery-3.5.1.slim.js"))),
+ "bootstrap.css" => Ok(Content(
+ ContentType::CSS,
+ include_bytes!("../static/scripts/bootstrap.css"),
+ )),
+ "bootstrap-native.js" => Ok(Content(
+ ContentType::JavaScript,
+ include_bytes!("../static/scripts/bootstrap-native.js"),
+ )),
+ "identicon.js" => Ok(Content(
+ ContentType::JavaScript,
+ include_bytes!("../static/scripts/identicon.js"),
+ )),
+ "datatables.js" => Ok(Content(
+ ContentType::JavaScript,
+ include_bytes!("../static/scripts/datatables.js"),
+ )),
+ "datatables.css" => Ok(Content(
+ ContentType::CSS,
+ include_bytes!("../static/scripts/datatables.css"),
+ )),
+ "jquery-3.5.1.slim.js" => Ok(Content(
+ ContentType::JavaScript,
+ include_bytes!("../static/scripts/jquery-3.5.1.slim.js"),
+ )),
_ => err!(format!("Static file not found: {}", filename)),
}
}