mirror of
https://gitea.farpn.net/w1cdn/farpn_udp_server.git
synced 2025-10-20 00:14:09 -05:00
Add spotter to database.
This commit is contained in:
@ -65,7 +65,8 @@ fn create_database() -> Result<()> {
|
|||||||
source TEXT,
|
source TEXT,
|
||||||
summary TEXT,
|
summary TEXT,
|
||||||
final_destination TEXT,
|
final_destination TEXT,
|
||||||
text TEXT
|
text TEXT,
|
||||||
|
spotter TEXT
|
||||||
)",
|
)",
|
||||||
[], // No parameters needed
|
[], // No parameters needed
|
||||||
)?;
|
)?;
|
||||||
@ -90,12 +91,14 @@ fn insert_packet(p_json: serde_json::Value) -> Result<()> {
|
|||||||
source,
|
source,
|
||||||
summary,
|
summary,
|
||||||
final_destination,
|
final_destination,
|
||||||
text) VALUES (?1, ?2, ?3, ?4, ?5)",
|
text,
|
||||||
|
spotter) VALUES (?1, ?2, ?3, ?4, ?5, ?6)",
|
||||||
params![ds,
|
params![ds,
|
||||||
&p_json["source"],
|
&p_json["source"],
|
||||||
&p_json["summary"],
|
&p_json["summary"],
|
||||||
&p_json["final_destination"],
|
&p_json["final_destination"],
|
||||||
&p_json["text"]], // Bind parameters
|
&p_json["text"],
|
||||||
|
&p_json["spotter"]] // Bind parameters
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
//println!("Row inserted successfully.");
|
//println!("Row inserted successfully.");
|
||||||
|
Reference in New Issue
Block a user