Merge branch 'refs/heads/feat-user-sync'
This commit is contained in:
commit
47df437cdd
|
|
@ -116,6 +116,10 @@ func AddUserSync(req proto.UserAddOrUpdate) uint {
|
|||
if res.Error != nil {
|
||||
return 0
|
||||
}
|
||||
res = DB.Exec("update users set created_at=null where id=?", req.ID)
|
||||
if res.Error != nil {
|
||||
return 0
|
||||
}
|
||||
return req.ID
|
||||
}
|
||||
|
||||
|
|
@ -125,6 +129,10 @@ func UpdateUserSync(req proto.UserAddOrUpdate) uint {
|
|||
if res.Error != nil {
|
||||
return 0
|
||||
}
|
||||
res = DB.Exec("update users set created_at=null where id=?", req.ID)
|
||||
if res.Error != nil {
|
||||
return 0
|
||||
}
|
||||
return req.ID
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue