mirror of
https://github.com/storytold/artcraft.git
synced 2026-10-31 07:27:51 +00:00
discord link in index controller
This commit is contained in:
1 parent
f777aa6afb
commit
32a2f19ccb
3 files changed
+5
-5
No files matched your search
+2
-2
@@ -7,11 +7,11 @@ use log::debug;
|
||||
|
||||
use crate::state::server_state::ServerState;
|
||||
|
||||
pub async fn get_root_index(server_state: Data<Arc<ServerState>>) -> HttpResponse {
|
||||
pub async fn get_root_handler(server_state: Data<Arc<ServerState>>) -> HttpResponse {
|
||||
debug!("GET /"); // NB: Google load balancer hits this a lot, and it spams.
|
||||
let body = format!(" \
|
||||
<h1>hello!</h1> \
|
||||
<p>Are you looking for an API? <a href=\"https://discord.gg/H72KFXm\">Join our Discord!</a></p> \
|
||||
<p>Are you looking for an API? <a href=\"https://discord.gg/artcraft\">Join our Discord!</a></p> \
|
||||
<p>Maybe you want to work with us? We can pay! Get in touch!</p> \
|
||||
<p><em>storyteller-web instance: {}</em></p> \
|
||||
", server_state.hostname);
|
||||
@@ -3,4 +3,4 @@ pub mod default_route_404;
|
||||
pub mod detect_locale_handler;
|
||||
pub mod enable_alpha_easy_handler;
|
||||
pub mod enable_alpha_handler;
|
||||
pub mod root_index;
|
||||
pub mod get_root_handler;
|
||||
@@ -1,6 +1,6 @@
|
||||
use crate::http_server::endpoints::misc::default_route_404::default_route_404;
|
||||
use crate::http_server::endpoints::misc::detect_locale_handler::detect_locale_handler;
|
||||
use crate::http_server::endpoints::misc::root_index::get_root_index;
|
||||
use crate::http_server::endpoints::misc::get_root_handler::get_root_handler;
|
||||
use crate::http_server::endpoints::service::health_check_handler::get_health_check_handler;
|
||||
use crate::http_server::endpoints::service::public_info_handler::get_public_info_handler;
|
||||
use crate::http_server::endpoints::service::status_alert_handler::status_alert_handler;
|
||||
@@ -44,7 +44,7 @@ where
|
||||
.route(web::head().to(|| HttpResponse::Ok()))
|
||||
)
|
||||
.service(web::resource("/")
|
||||
.route(web::get().to(get_root_index))
|
||||
.route(web::get().to(get_root_handler))
|
||||
.route(web::head().to(|| HttpResponse::Ok()))
|
||||
)
|
||||
.default_service( web::route().to(default_route_404))
|
||||
|
||||
Reference in new issue
Block a user