80aef61aed
More fixes - fixed docker builds - fixed mentions regex test - fixed DATABASE_URL stuff - change schema path in diesel.toml Address review comments - add jsonb column back into activity table - remove authors field from cargo.toml - adjust LEMMY_DATABASE_URL env var usage - rename all occurences of LEMMY_DATABASE_URL to DATABASE_URL Decouple utils and db Split code into cargo workspaces Co-authored-by: Felix Ableitner <me@nutomic.com> Reviewed-on: https://yerbamate.dev/LemmyNet/lemmy/pulls/67
50 lines
1.7 KiB
Rust
50 lines
1.7 KiB
Rust
use actix_files::NamedFile;
|
|
use actix_web::*;
|
|
use lemmy_utils::settings::Settings;
|
|
|
|
pub fn config(cfg: &mut web::ServiceConfig) {
|
|
cfg
|
|
.route("/", web::get().to(index))
|
|
.route(
|
|
"/home/data_type/{data_type}/listing_type/{listing_type}/sort/{sort}/page/{page}",
|
|
web::get().to(index),
|
|
)
|
|
.route("/login", web::get().to(index))
|
|
.route("/create_post", web::get().to(index))
|
|
.route("/create_community", web::get().to(index))
|
|
.route("/create_private_message", web::get().to(index))
|
|
.route("/communities/page/{page}", web::get().to(index))
|
|
.route("/communities", web::get().to(index))
|
|
.route("/post/{id}/comment/{id2}", web::get().to(index))
|
|
.route("/post/{id}", web::get().to(index))
|
|
.route(
|
|
"/c/{name}/data_type/{data_type}/sort/{sort}/page/{page}",
|
|
web::get().to(index),
|
|
)
|
|
.route("/c/{name}", web::get().to(index))
|
|
.route("/community/{id}", web::get().to(index))
|
|
.route(
|
|
"/u/{username}/view/{view}/sort/{sort}/page/{page}",
|
|
web::get().to(index),
|
|
)
|
|
.route("/u/{username}", web::get().to(index))
|
|
.route("/user/{id}", web::get().to(index))
|
|
.route("/inbox", web::get().to(index))
|
|
.route("/modlog/community/{community_id}", web::get().to(index))
|
|
.route("/modlog", web::get().to(index))
|
|
.route("/setup", web::get().to(index))
|
|
.route("/admin", web::get().to(index))
|
|
.route(
|
|
"/search/q/{q}/type/{type}/sort/{sort}/page/{page}",
|
|
web::get().to(index),
|
|
)
|
|
.route("/search", web::get().to(index))
|
|
.route("/sponsors", web::get().to(index))
|
|
.route("/password_change/{token}", web::get().to(index));
|
|
}
|
|
|
|
async fn index() -> Result<NamedFile, Error> {
|
|
Ok(NamedFile::open(
|
|
Settings::get().front_end_dir + "/index.html",
|
|
)?)
|
|
}
|