aboutsummaryrefslogtreecommitdiff
path: root/lib/go_vanity/src/lib.rs
blob: e4a11e2814862e5a1bba351e3ee17bf040e0652a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
use warp::{http::Response, Rejection, Reply};
use crate::templates::{RenderRucte};

include!(concat!(env!("OUT_DIR"), "/templates.rs"));

pub async fn gitea(pkg_name: &str, git_repo: &str) -> Result<impl Reply, Rejection> {
    Response::builder().html(|o| templates::gitea_html(o, pkg_name, git_repo))
}

pub async fn github(pkg_name: &str, git_repo: &str) -> Result<impl Reply, Rejection> {
    Response::builder().html(|o| templates::github_html(o, pkg_name, git_repo))
}