Fix setting timestamp for when action is taken
This commit is contained in:
parent
60bf09e813
commit
114aec73ed
2 changed files with 6 additions and 5 deletions
|
|
@ -2,6 +2,7 @@ package arcgis
|
|||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/Gleipnir-Technology/nidus-sync/db"
|
||||
"github.com/Gleipnir-Technology/nidus-sync/db/gen/nidus-sync/arcgis/model"
|
||||
|
|
@ -16,7 +17,7 @@ func OAuthTokenInsert(ctx context.Context, m *model.OAuthToken) (*model.OAuthTok
|
|||
}
|
||||
func OAuthTokenInvalidate(ctx context.Context, id int64) error {
|
||||
statement := table.OAuthToken.UPDATE().
|
||||
SET(table.OAuthToken.InvalidatedAt.SET(postgres.LOCALTIMESTAMP())).
|
||||
SET(table.OAuthToken.InvalidatedAt.SET(postgres.TimestampT(time.Now()))).
|
||||
WHERE(table.OAuthToken.ID.EQ(postgres.Int(id)))
|
||||
return db.ExecuteNone(ctx, statement)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue