general: add /api/last route

This commit is contained in:
k
2024-09-20 16:56:36 +02:00
parent 7d211f74d1
commit c8ded4ddb3
10 changed files with 95 additions and 34 deletions

View File

@@ -1,9 +1,13 @@
use std::path::{Path, PathBuf};
use serde_json::Value;
pub trait AnyMap {
fn path(&self) -> &Path;
fn path_last(&self) -> &Option<PathBuf>;
fn last_value(&self) -> Option<Value>;
fn t_name(&self) -> &str;
fn exported_path_with_t_name(&self) -> Vec<(&Path, &str)> {
@@ -16,8 +20,6 @@ pub trait AnyMap {
}
}
// fn reset(&mut self) -> color_eyre::Result<()>;
fn pre_export(&mut self);
fn export(&self) -> color_eyre::Result<()>;
fn post_export(&mut self);