mirror of
https://github.com/usememos/memos.git
synced 2025-04-24 06:17:28 +02:00
fix: fail to update user's update_ts (#2410)
This commit is contained in:
parent
664c9c4a7c
commit
af7c0a76d0
@ -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) {
|
func (d *DB) UpdateUser(ctx context.Context, update *store.UpdateUser) (*store.User, error) {
|
||||||
set, args := []string{}, []any{}
|
set, args := []string{}, []any{}
|
||||||
if v := update.UpdatedTs; v != nil {
|
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 {
|
if v := update.RowStatus; v != nil {
|
||||||
set, args = append(set, "`row_status` = ?"), append(args, *v)
|
set, args = append(set, "`row_status` = ?"), append(args, *v)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user