forked from trinitrix/core
Fix(app::command_interface): Add a `greet_multiple()` func to test tables
This is, like the `greet` function only here to debug the lua api. It outputs a table.
This commit is contained in:
parent
c0a1fc0a02
commit
909fc01a48
|
@ -22,6 +22,10 @@ struct Commands {
|
||||||
/// Greets the user
|
/// Greets the user
|
||||||
greet: fn(String) -> String,
|
greet: fn(String) -> String,
|
||||||
|
|
||||||
|
/// Returns a table of greeted users
|
||||||
|
greet_multiple: fn() -> Table,
|
||||||
|
// End debug functions
|
||||||
|
|
||||||
/// Closes the application
|
/// Closes the application
|
||||||
exit: fn(),
|
exit: fn(),
|
||||||
|
|
||||||
|
|
|
@ -122,6 +122,12 @@ pub async fn handle(
|
||||||
send_main_output!("{}", output);
|
send_main_output!("{}", output);
|
||||||
EventStatus::Ok
|
EventStatus::Ok
|
||||||
}
|
}
|
||||||
|
Command::GreetMultiple => {
|
||||||
|
let mut table: Table = HashMap::new();
|
||||||
|
table.insert("UserName1".to_owned(), CommandTransferValue::Integer(2));
|
||||||
|
send_main_output!(table);
|
||||||
|
EventStatus::Ok
|
||||||
|
}
|
||||||
Command::Help(_) => todo!(),
|
Command::Help(_) => todo!(),
|
||||||
Command::RaiseError(err) => {
|
Command::RaiseError(err) => {
|
||||||
send_error_output!(err);
|
send_error_output!(err);
|
||||||
|
|
Loading…
Reference in New Issue