2018-05-10 18:01:16 +00:00
|
|
|
use rocket::response::NamedFile;
|
|
|
|
use std::path::{Path, PathBuf};
|
|
|
|
|
2018-04-23 10:54:37 +00:00
|
|
|
pub mod blogs;
|
2018-05-10 09:44:57 +00:00
|
|
|
pub mod comments;
|
2018-04-22 13:35:37 +00:00
|
|
|
pub mod instance;
|
2018-05-10 16:38:03 +00:00
|
|
|
pub mod likes;
|
2018-05-13 13:35:55 +00:00
|
|
|
pub mod notifications;
|
2018-04-23 14:25:39 +00:00
|
|
|
pub mod posts;
|
2018-05-19 09:51:10 +00:00
|
|
|
pub mod reshares;
|
2018-04-24 09:21:39 +00:00
|
|
|
pub mod session;
|
2018-04-22 18:13:12 +00:00
|
|
|
pub mod user;
|
2018-04-24 08:35:45 +00:00
|
|
|
pub mod well_known;
|
2018-05-10 18:01:16 +00:00
|
|
|
|
|
|
|
#[get("/static/<file..>")]
|
|
|
|
fn static_files(file: PathBuf) -> Option<NamedFile> {
|
|
|
|
NamedFile::open(Path::new("static/").join(file)).ok()
|
|
|
|
}
|