added initial callback handling

This commit is contained in:
Valmo Trindade
2025-01-31 16:47:03 -03:00
parent 910eab7397
commit 334e8bfed8
2 changed files with 8 additions and 0 deletions

View File

@@ -38,6 +38,7 @@ pub fn init() -> Extension {
) )
.command("local_ip", util::get_local_address) .command("local_ip", util::get_local_address)
.command("uuid", util::get_uuid) .command("uuid", util::get_uuid)
.command("callback", util::test_callback)
.command("log", util::log_info) .command("log", util::log_info)
.group( .group(
"cot_router", "cot_router",

View File

@@ -1,3 +1,4 @@
use arma_rs::Context;
use log::{error, info, warn}; use log::{error, info, warn};
use std::net::{IpAddr, UdpSocket}; use std::net::{IpAddr, UdpSocket};
use crate::structs::LogPayload; 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"
}