Skip to content

Commit

Permalink
Release 2.2.9
Browse files Browse the repository at this point in the history
  • Loading branch information
WorkingRobot committed Jan 13, 2025
1 parent 22f4414 commit 1e0256c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion web/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion web/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "waitingway-web"
authors = ["Asriel Camora <[email protected]>"]
description = "Backend web server for Waitingway"
repository = "https://github.com/WorkingRobot/Waitingway"
version = "2.2.8"
version = "2.2.9"
edition = "2021"

[dependencies]
Expand Down
10 changes: 7 additions & 3 deletions web/src/routes/redirects.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
use actix_web::{dev::HttpServiceFactory, get, http::header, HttpResponse, Result};
use crate::config::Config;
use actix_web::{dev::HttpServiceFactory, get, http::header, web, HttpResponse, Result};

pub fn service() -> impl HttpServiceFactory {
(discord, funding, github)
}

#[get("/discord/")]
async fn discord() -> Result<HttpResponse> {
async fn discord(config: web::Data<Config>) -> Result<HttpResponse> {
Ok(HttpResponse::MovedPermanently()
.insert_header((header::LOCATION, "https://discord.gg/3PGKKWYTGc"))
.insert_header((
header::LOCATION,
format!("https://discord.gg/{}", config.discord.guild_invite_code),
))
.finish())
}

Expand Down

0 comments on commit 1e0256c

Please sign in to comment.