summaryrefslogtreecommitdiff
path: root/src/template.rs
blob: 8a36a09fa4d1ce43b49d3142ff3dd76d9056842a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::session::Session;
use askama::Template;
use std::collections::HashMap;

#[derive(Template)]
#[template(path = "index.html")]
pub struct IndexTemplate<'a> {
    pub sessions: &'a HashMap<String, Session>,
}

#[derive(Template)]
#[template(path = "session.html")]
pub struct SessionTemplate<'a> {
    pub id: &'a String,
    pub session: &'a Session,
}