1
0
Fork 0
mirror of https://github.com/dani-garcia/vaultwarden.git synced 2025-05-21 02:53:56 +00:00

use static_files() for email attachments

Apply suggestions from code review

Co-authored-by: Mathijs van Veluw <black.dex@gmail.com>
This commit is contained in:
Stefan Melmuk 2022-10-06 11:59:47 +02:00
parent ea19c2250e
commit 4289663a16
No known key found for this signature in database
GPG key ID: 817020C608FE9C09
4 changed files with 5 additions and 4 deletions

View file

@ -89,7 +89,7 @@ fn alive(_conn: DbConn) -> Json<String> {
}
#[get("/vw_static/<filename>")]
fn static_files(filename: String) -> Result<(ContentType, &'static [u8]), Error> {
pub fn static_files(filename: String) -> Result<(ContentType, &'static [u8]), Error> {
match filename.as_ref() {
"mail-github.png" => Ok((ContentType::PNG, include_bytes!("../static/images/mail-github.png"))),
"logo-gray.png" => Ok((ContentType::PNG, include_bytes!("../static/images/logo-gray.png"))),