other.rs 544 Bytes
use actix_web::Error;
use anyhow::Result;

pub async fn root() -> Result<actix_files::NamedFile, Error> {
    Ok(actix_files::NamedFile::open("static/index.html")?)
}

pub async fn apidoc() -> Result<actix_files::NamedFile, Error> {
    Ok(actix_files::NamedFile::open("static/api.html")?)
}

pub async fn p404() -> Result<actix_files::NamedFile, Error> {
    Ok(actix_files::NamedFile::open("static/404.html")?)
}

pub async fn favicon() -> Result<actix_files::NamedFile, Error> {
    Ok(actix_files::NamedFile::open("static/favicon.ico")?)
}