CLI: Implement category delete,show,list
此提交包含在:
10
cli.h
10
cli.h
@@ -33,6 +33,9 @@ class CLIHandler
|
||||
std::pair<bool, std::string> page_list(const std::vector<std::string> &args);
|
||||
std::pair<bool, std::string> pageperms_set_permissions(const std::vector<std::string> &args);
|
||||
std::pair<bool, std::string> version(const std::vector<std::string> &args);
|
||||
std::pair<bool, std::string> category_list(const std::vector<std::string> &args);
|
||||
std::pair<bool, std::string> category_delete(const std::vector<std::string> &args);
|
||||
std::pair<bool, std::string> category_show(const std::vector<std::string> &args);
|
||||
|
||||
std::vector<struct cmd> cmds{
|
||||
{{"user",
|
||||
@@ -50,6 +53,13 @@ class CLIHandler
|
||||
1,
|
||||
{{{"list", "- lists existing pages", 0, {}, &CLIHandler::page_list}}},
|
||||
&CLIHandler::cli_help},
|
||||
{"category",
|
||||
"operation on categories",
|
||||
1,
|
||||
{{{"list", "- lists existing categories", 0, {}, &CLIHandler::category_list},
|
||||
{"delete", " - deletes a category", 1, {}, &CLIHandler::category_delete},
|
||||
{"show", " - shows pages of a category", 1, {}, &CLIHandler::category_show}}},
|
||||
&CLIHandler::cli_help},
|
||||
{"pageperms",
|
||||
"set permissions on pages",
|
||||
1,
|
||||
|
新增問題並參考
封鎖使用者