🏡 index : ~doyle/rgit.git

author Jordan Doyle <jordan@doyle.la> 2022-07-08 23:04:34.0 +01:00:00
committer Jordan Doyle <jordan@doyle.la> 2022-07-08 23:04:34.0 +01:00:00
commit
b001a0330123c11b68e4fdca334f52c629321e36 [patch]
tree
14d3621e423376ef1e1d1e480fb46648c784d3dc
parent
1d986bce8b7cbd2ffb06b3fae0e6666710dcceaf
download
b001a0330123c11b68e4fdca334f52c629321e36.tar.gz

Remove stats page



Diff

 src/methods/repo.rs       | 12 ------------
 templates/repo/base.html  |  1 -
 templates/repo/stats.html |  6 ------
 3 files changed, 19 deletions(-)

diff --git a/src/methods/repo.rs b/src/methods/repo.rs
index 8753160..e3a62df 100644
--- a/src/methods/repo.rs
+++ a/src/methods/repo.rs
@@ -59,7 +59,6 @@
        Some("tree") => BoxCloneService::new(handle_tree.into_service()),
        Some("commit") => BoxCloneService::new(handle_commit.into_service()),
        Some("diff") => BoxCloneService::new(handle_diff.into_service()),
        Some("stats") => BoxCloneService::new(handle_stats.into_service()),
        Some("tag") => BoxCloneService::new(handle_tag.into_service()),
        Some(v) => {
            uri_parts.push(v);
@@ -268,15 +267,4 @@
        .render()
        .unwrap(),
    )
}

#[allow(clippy::unused_async)]
pub async fn handle_stats(Extension(repo): Extension<Repository>) -> Html<String> {
    #[derive(Template)]
    #[template(path = "repo/stats.html")]
    pub struct View {
        pub repo: Repository,
    }

    Html(View { repo }.render().unwrap())
}
diff --git a/templates/repo/base.html b/templates/repo/base.html
index 24e1590..c10e93b 100644
--- a/templates/repo/base.html
+++ a/templates/repo/base.html
@@ -9,6 +9,5 @@
    <a href="/{{ repo.display() }}/tree" class="{% block tree_nav_class %}{% endblock %}">tree</a>
    <a href="/{{ repo.display() }}/commit" class="{% block commit_nav_class %}{% endblock %}">commit</a>
    <a href="/{{ repo.display() }}/diff" class="{% block diff_nav_class %}{% endblock %}">diff</a>
    <a href="/{{ repo.display() }}/stats" class="{% block stats_nav_class %}{% endblock %}">stats</a>
</nav>
{% endblock %}
diff --git a/templates/repo/stats.html b/templates/repo/stats.html
deleted file mode 100644
index e917c8f..0000000 100644
--- a/templates/repo/stats.html
+++ /dev/null
@@ -1,6 +1,0 @@
{% extends "repo/base.html" %}

{% block stats_nav_class %}active{% endblock %}

{% block content %}
{% endblock %}