fix default value not set (#80)

This commit is contained in:
MaysWind
2025-03-01 21:48:34 +08:00
parent 7abb5972eb
commit 3954db9b99
+5 -1
View File
@@ -792,7 +792,11 @@ func exportUserTransaction(c *core.CliContext) error {
filePath := c.String("file")
fileType := c.String("type")
if fileType != "" && fileType != "csv" && fileType != "tsv" {
if fileType == "" {
fileType = "csv"
}
if fileType != "csv" && fileType != "tsv" {
log.CliErrorf(c, "[user_data.exportUserTransaction] export file type is not supported")
return errs.ErrNotSupported
}