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:
Benedikt Peetz 2023-07-26 21:12:17 +02:00
parent c0a1fc0a02
commit 909fc01a48
Signed by: bpeetz
GPG Key ID: A5E94010C3A642AD
2 changed files with 10 additions and 0 deletions

View File

@ -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(),

View File

@ -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);