From f7e1218f210bbb92399861eef2086ef7185278f4 Mon Sep 17 00:00:00 2001 From: trotFunky Date: Thu, 25 Jul 2024 16:54:19 +0100 Subject: [PATCH] truths: Change truth creation URL As we will be able to create a new week, /new to /new_truth to differentiate it from the week creation URL. --- src/truth.rs | 2 +- templates/index.html.tera | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/truth.rs b/src/truth.rs index dd4c0ea..ae96101 100644 --- a/src/truth.rs +++ b/src/truth.rs @@ -53,7 +53,7 @@ pub async fn edit_truth(week: u8, truth_number: u8, form: Form, Redirect::to(uri!("/")) } -#[post("//new", data="
")] +#[post("//new_truth", data="")] pub async fn create_truth(week: u8, form: Form, mut db: Connection, cookies: &CookieJar<'_>) -> Redirect { let user = auth::get_user(week, &mut db, cookies).await; diff --git a/templates/index.html.tera b/templates/index.html.tera index ae99a96..9c8f302 100644 --- a/templates/index.html.tera +++ b/templates/index.html.tera @@ -91,7 +91,7 @@ {% if user.is_admin == true %}

Nouvelle vérité

- + {% include "truth_editor" %}