blob: 857706505da843e38534c4313c5c48547455fd24 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
pub mod transactions;
pub mod balance;
use parsers::csv::CsvFile;
use crate::banking::Account;
//use parsers::ini::IniFile;
use std::collections::HashMap;
use rocket_contrib::templates::Template;
use rocket::response::NamedFile;
use std::path::{PathBuf, Path};
use rocket::request::Form;
use rocket::http::RawStr;
use regex::Regex;
use chrono::{NaiveDate, Utc};
use chrono::Datelike;
/*
* Overview over all accounts, complete asset overview?
*/
#[get("/")]
pub fn account_handler() -> rocket_contrib::templates::Template {
let context : HashMap<u32, u32> = HashMap::new();
Template::render("account", context)
}
// allow always access
#[get("/static/<file..>")]
pub fn static_handler(file: PathBuf) -> Option<NamedFile> {
NamedFile::open(Path::new("static/").join(file)).ok()
}
|