mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-10 18:05:44 +02:00
chore: add noop docs subcmd (#4214)
* add noop subcommand DOCS to COMMAND
This commit is contained in:
parent
010bd8add4
commit
4aece00aac
1 changed files with 7 additions and 1 deletions
|
@ -2450,8 +2450,10 @@ void Service::Command(CmdArgList args, Transaction* tx, SinkReplyBuilder* builde
|
|||
return builder->SendLong(cmd_cnt);
|
||||
}
|
||||
|
||||
const bool sufficient_args = (args.size() == 2);
|
||||
|
||||
// INFO [cmd]
|
||||
if (subcmd == "INFO" && args.size() == 2) {
|
||||
if (subcmd == "INFO" && sufficient_args) {
|
||||
string cmd = absl::AsciiStrToUpper(ArgS(args, 1));
|
||||
|
||||
if (const auto* cid = registry_.Find(cmd); cid) {
|
||||
|
@ -2464,6 +2466,10 @@ void Service::Command(CmdArgList args, Transaction* tx, SinkReplyBuilder* builde
|
|||
return;
|
||||
}
|
||||
|
||||
if (subcmd == "DOCS" && sufficient_args) {
|
||||
return builder->SendOk();
|
||||
}
|
||||
|
||||
return builder->SendError(kSyntaxErr, kSyntaxErrType);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue