diff --git a/kernel/api/storage.go b/kernel/api/storage.go index 4c20087f6..197348f17 100644 --- a/kernel/api/storage.go +++ b/kernel/api/storage.go @@ -251,6 +251,10 @@ func updateRecentDocViewTime(c *gin.Context) { return } + if nil == arg["rootID"] { + return + } + rootID := arg["rootID"].(string) err := model.UpdateRecentDocViewTime(rootID) if err != nil { @@ -269,6 +273,10 @@ func updateRecentDocOpenTime(c *gin.Context) { return } + if nil == arg["rootID"] { + return + } + rootID := arg["rootID"].(string) err := model.UpdateRecentDocOpenTime(rootID) if err != nil {