21 lines
411 B
Rust
21 lines
411 B
Rust
pub mod monitor;
|
|
|
|
use rocket::serde::json::{Value, json};
|
|
use rocket::serde::{Serialize};
|
|
|
|
// HELPER FUNCTIONS
|
|
|
|
pub fn build_json_response(
|
|
status: String,
|
|
data: Option<Value>,
|
|
msg: Option<String>,
|
|
) -> Value {
|
|
json!({ "status": status, "data": data, "msg": msg })
|
|
}
|
|
|
|
#[derive(Debug, Serialize)]
|
|
pub struct FlashContext {
|
|
pub flash_name: Option<String>,
|
|
pub flash_msg: Option<String>,
|
|
}
|