mirror of
https://github.com/valmojr/armatak.git
synced 2026-06-13 14:03:29 +00:00
added initial callback handling
This commit is contained in:
@@ -38,6 +38,7 @@ pub fn init() -> Extension {
|
||||
)
|
||||
.command("local_ip", util::get_local_address)
|
||||
.command("uuid", util::get_uuid)
|
||||
.command("callback", util::test_callback)
|
||||
.command("log", util::log_info)
|
||||
.group(
|
||||
"cot_router",
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
use arma_rs::Context;
|
||||
use log::{error, info, warn};
|
||||
use std::net::{IpAddr, UdpSocket};
|
||||
use crate::structs::LogPayload;
|
||||
@@ -43,3 +44,9 @@ pub fn get_local_address() -> String {
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
pub fn test_callback(ctx: Context) -> &'static str {
|
||||
let _ = ctx.callback_data("armatak_test_callback", "123", "321");
|
||||
|
||||
"Testing Callback"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user