Turn Calendar into drawing

This commit is contained in:
Joscha 2024-03-30 12:21:38 +01:00
parent a50e0999ca
commit d04a697d51
4 changed files with 26 additions and 16 deletions

View file

@ -12,7 +12,7 @@ use axum::{
use serde::Deserialize;
use tokio::{net::TcpListener, sync::mpsc};
use crate::drawer::Command;
use crate::drawer::{CalendarDrawing, Command};
use self::{r#static::get_static_file, statuscode::status_code};
@ -133,10 +133,10 @@ struct PostCalendarForm {
async fn post_calendar(server: State<Server>, request: Form<PostCalendarForm>) {
let _ = server
.tx
.send(Command::Calendar {
.send(Command::draw(CalendarDrawing {
year: request.0.year,
month: request.0.month,
})
}))
.await;
}