From c737d9674b8fea9240efc50dc22cda8c3a4bb770 Mon Sep 17 00:00:00 2001 From: robin <67917529+comfysage@users.noreply.github.com> Date: Sat, 1 Feb 2025 13:24:24 +0100 Subject: [PATCH] feat(api): create discord redirect (#43) --- content/nix-shells.md | 2 +- src/main.rs | 4 ++++ templates/pages/home.tera | 2 +- templates/partials/footer.tera | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/content/nix-shells.md b/content/nix-shells.md index c5b10a5..9f9ca7d 100644 --- a/content/nix-shells.md +++ b/content/nix-shells.md @@ -319,4 +319,4 @@ You may have notice that we are not taking any inputs and are only producing out ## Wrapping up -Nix is a great tool for managing dependencies, and I hope this post has helped you understand how to use it in your projects. If you have any further questions feel free to [email me](mailto:isabel@isabelroses.com) or join [my discord server](https://discord.gg/8RVhHeJH3x). Thanks for reading!!! And If you really enjoyed the post please consider donating so I can keep doing this kind of thing on [kofi](https://ko-fi.com/isabelroses) or [GitHub Sponsors](https://github.com/sponsors/isabelroses). +Nix is a great tool for managing dependencies, and I hope this post has helped you understand how to use it in your projects. If you have any further questions feel free to [email me](mailto:isabel@isabelroses.com) or join [my discord server](/api/discord). Thanks for reading!!! And If you really enjoyed the post please consider donating so I can keep doing this kind of thing on [kofi](https://ko-fi.com/isabelroses) or [GitHub Sponsors](https://github.com/sponsors/isabelroses). diff --git a/src/main.rs b/src/main.rs index 9082ed7..b318ef1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -52,6 +52,10 @@ async fn main() { let api_routes = Router::new() .route("/github", post(api::github::handler)) .route("/kofi", post(api::kofi::handler)) + .route( + "/discord", + get(|| async { Redirect::permanent("https://discord.gg/8RVhHeJH3x") }), + ) .fallback(get(api::fallback)); let app = Router::new() diff --git a/templates/pages/home.tera b/templates/pages/home.tera index 9b03683..c4c3adf 100644 --- a/templates/pages/home.tera +++ b/templates/pages/home.tera @@ -29,7 +29,7 @@