From cd99b9fa9d6b1342f9b8c1a38441df20ac6b89e4 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Sat, 22 Oct 2022 23:39:33 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E4=BA=91=E7=AB=AF=E6=94=B6=E9=9B=86?= =?UTF-8?q?=E7=AE=B1=E6=96=87=E6=A1=A3=E5=86=85=E6=B7=BB=E5=8A=A0=E5=88=B7?= =?UTF-8?q?=E6=96=B0=E6=8C=89=E9=92=AE=20https://github.com/siyuan-note/si?= =?UTF-8?q?yuan/issues/6306?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/liandi.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/model/liandi.go b/kernel/model/liandi.go index d31698291..6b703a121 100644 --- a/kernel/model/liandi.go +++ b/kernel/model/liandi.go @@ -357,8 +357,8 @@ func RemoveCloudShorthands(ids []string) (err error) { return } -func GetCloudShorthand(id string) (result map[string]interface{}, err error) { - result = map[string]interface{}{} +func GetCloudShorthand(id string) (ret map[string]interface{}, err error) { + result := map[string]interface{}{} request := httpclient.NewCloudRequest() resp, err := request. SetResult(&result). @@ -381,10 +381,10 @@ func GetCloudShorthand(id string) (result map[string]interface{}, err error) { err = errors.New(result["msg"].(string)) return } - shorthand := result["data"].(map[string]interface{}) + ret = result["data"].(map[string]interface{}) t, _ := strconv.ParseInt(id, 10, 64) hCreated := util.Millisecond2Time(t) - shorthand["hCreated"] = hCreated.Format("2006-01-02 15:04") + ret["hCreated"] = hCreated.Format("2006-01-02 15:04") return }