mirror of https://github.com/ledisdb/ledisdb.git
modify argument checking
This commit is contained in:
parent
2166c6ff19
commit
b5e5b787d6
|
@ -210,7 +210,7 @@ func bexpireCommand(req *requestContext) error {
|
||||||
|
|
||||||
func bexpireatCommand(req *requestContext) error {
|
func bexpireatCommand(req *requestContext) error {
|
||||||
args := req.args
|
args := req.args
|
||||||
if len(args) == 0 {
|
if len(args) != 1 {
|
||||||
return ErrCmdParams
|
return ErrCmdParams
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -230,7 +230,7 @@ func bexpireatCommand(req *requestContext) error {
|
||||||
|
|
||||||
func bttlCommand(req *requestContext) error {
|
func bttlCommand(req *requestContext) error {
|
||||||
args := req.args
|
args := req.args
|
||||||
if len(args) == 0 {
|
if len(args) != 1 {
|
||||||
return ErrCmdParams
|
return ErrCmdParams
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue