🎨 云端收集箱文档内添加刷新按钮 https://github.com/siyuan-note/siyuan/issues/6306

This commit is contained in:
Liang Ding 2022-10-22 23:39:33 +08:00
parent ef5d7d5755
commit cd99b9fa9d
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -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
}