auric_runtime/routing/default_route.rs
1use crate::Context;
2use crate::routing::{Route, RouteModel};
3use anyhow::Result;
4use async_trait::async_trait;
5use serde_json::{Value, json};
6
7#[derive(Default)]
8pub struct DefaultRoute {}
9
10#[async_trait]
11impl Route for DefaultRoute {
12 fn init(&mut self, _context: &dyn Context) -> Result<()> {
13 Ok(())
14 }
15
16 async fn model(&self, _params: &[Value]) -> Result<RouteModel> {
17 Ok(RouteModel::Json(json!({})))
18 }
19}