Port commit page

This commit is contained in:
Joscha 2023-08-13 21:19:43 +02:00
parent db0234b750
commit 373b3168f1
7 changed files with 111 additions and 19 deletions

View file

@ -7,7 +7,14 @@ use serde::Deserialize;
use sqlx::SqlitePool;
use time::OffsetDateTime;
use crate::{config::Config, server::web::paths::PathAdminQueueAdd, somehow};
use crate::{
config::Config,
server::web::{
base::{Base, Tab},
paths::{PathAdminQueueAdd, PathQueue},
},
somehow,
};
#[derive(Deserialize)]
pub struct FormAdminQueueAdd {
@ -36,6 +43,6 @@ pub async fn post_admin_queue_add(
.execute(&db)
.await?;
// TODO Replace with typed link
Ok(Redirect::to(&format!("{}queue/", config.web_base)))
let link = Base::new(config, Tab::None).link(PathQueue {});
Ok(Redirect::to(&format!("{link}")))
}