From 506e606591af391557612fc9c40d84d36f18a9c5 Mon Sep 17 00:00:00 2001 From: BaoXuebin Date: Sat, 23 Jul 2022 12:20:28 +0800 Subject: [PATCH] fix: cannot close account #22 --- service/accounts.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/service/accounts.go b/service/accounts.go index 487ca79..66eabc8 100644 --- a/service/accounts.go +++ b/service/accounts.go @@ -168,7 +168,7 @@ func CloseAccount(c *gin.Context) { ledgerConfig := script.GetLedgerConfigFromContext(c) line := fmt.Sprintf("%s close %s", accountForm.Date, accountForm.Account) // 写入文件 - filePath := ledgerConfig.DataPath + "/account/" + script.GetAccountPrefix(accountForm.Account) + ".bean" + filePath := ledgerConfig.DataPath + "/account/" + strings.ToLower(script.GetAccountPrefix(accountForm.Account)) + ".bean" err := script.AppendFileInNewLine(filePath, line) if err != nil { InternalError(c, err.Error()) @@ -197,7 +197,7 @@ func ChangeAccountIcon(c *gin.Context) { filePath := "./public/icons/" + script.GetAccountIconName(account) + ".png" if err := c.SaveUploadedFile(file, filePath); err != nil { InternalError(c, err.Error()) - //自己完成信息提示 + // 自己完成信息提示 return } var result = make(map[string]string)