Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

fix: fail to update user's update_ts (#2410)

Athurg Goothaf7c0a76d0b2
diff --git a/store/db/mysql/user.go b/store/db/mysql/user.go
index 0f0ec98f6..224cf9b60 100644
--- a/store/db/mysql/user.go
+++ b/store/db/mysql/user.go
@@ -64,7 +64,7 @@ func (d *DB) CreateUser(ctx context.Context, create *store.User) (*store.User, e
func (d *DB) UpdateUser(ctx context.Context, update *store.UpdateUser) (*store.User, error) {
set, args := []string{}, []any{}
if v := update.UpdatedTs; v != nil {
- set, args = append(set, "`updated_ts` = ?"), append(args, *v)
+ set, args = append(set, "`updated_ts` = FROM_UNIXTIME(?)"), append(args, *v)
}
if v := update.RowStatus; v != nil {
set, args = append(set, "`row_status` = ?"), append(args, *v)