3 pub fn config(cfg: &mut web::ServiceConfig) {
5 .route("/", web::get().to(index))
7 "/home/data_type/{data_type}/listing_type/{listing_type}/sort/{sort}/page/{page}",
10 .route("/login", web::get().to(index))
11 .route("/create_post", web::get().to(index))
12 .route("/create_community", web::get().to(index))
13 .route("/create_private_message", web::get().to(index))
14 .route("/communities/page/{page}", web::get().to(index))
15 .route("/communities", web::get().to(index))
16 .route("/post/{id}/comment/{id2}", web::get().to(index))
17 .route("/post/{id}", web::get().to(index))
19 "/c/{name}/data_type/{data_type}/sort/{sort}/page/{page}",
22 .route("/c/{name}", web::get().to(index))
23 .route("/community/{id}", web::get().to(index))
25 "/u/{username}/view/{view}/sort/{sort}/page/{page}",
28 .route("/u/{username}", web::get().to(index))
29 .route("/user/{id}", web::get().to(index))
30 .route("/inbox", web::get().to(index))
31 .route("/modlog/community/{community_id}", web::get().to(index))
32 .route("/modlog", web::get().to(index))
33 .route("/setup", web::get().to(index))
34 .route("/admin", web::get().to(index))
36 "/search/q/{q}/type/{type}/sort/{sort}/page/{page}",
39 .route("/search", web::get().to(index))
40 .route("/sponsors", web::get().to(index))
41 .route("/password_change/{token}", web::get().to(index));
44 async fn index() -> Result<NamedFile, actix_web::error::Error> {
46 Settings::get().front_end_dir + "/index.html",