Fix setting timestamp for when action is taken

This commit is contained in:
Eli Ribble 2026-05-04 20:09:56 +00:00
parent 60bf09e813
commit 114aec73ed
No known key found for this signature in database
2 changed files with 6 additions and 5 deletions

View file

@ -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)
}