Rename Node's body field to "text"

This commit is contained in:
Juno Takano 2025-12-10 10:25:32 -03:00
commit 32ea0f93c3
5 changed files with 23 additions and 22 deletions

View file

@ -11,7 +11,7 @@ pub struct Graph {
#[derive(Serialize, Deserialize, Clone, Default, Debug)]
pub struct Node {
pub body: String,
pub text: String,
#[serde(default)] pub title: String,
#[serde(default)] pub links: Vec<String>,
#[serde(default)] pub id: String,
@ -52,7 +52,7 @@ impl Node {
Self {
id: "VoidNode".to_string(),
title: "Pure Void".to_string(),
body: match message {
text: match message {
Some(s) => s,
None => "Node is empty, missing or wasn't found.".to_string()
},