MXS-1220: Add output for module commands
The module commands can now produce JSON formatted output which is passed to the caller. The output should conform to the JSON API as closely as possible. Currently, the REST API wraps all JSON produced by module commands inside a meta-object of the following type: { "meta": <output of module command> } This allows the output to be JSON API conformant without modifying the modules and allows incremental updates to code.
This commit is contained in:
@ -78,7 +78,7 @@ static int cdc_auth_set_client_data(
|
||||
* @param args Arguments for this command
|
||||
* @return True if user was successfully added
|
||||
*/
|
||||
static bool cdc_add_new_user(const MODULECMD_ARG *args)
|
||||
static bool cdc_add_new_user(const MODULECMD_ARG *args, json_t** output)
|
||||
{
|
||||
const char *user = args->argv[1].value.string;
|
||||
size_t userlen = strlen(user);
|
||||
|
Reference in New Issue
Block a user