Add oauth token failure model and notification

This will allow me to mark when an oauth token fails and surface it to
the user so that they can re-up on their auth token.
This commit is contained in:
Eli Ribble 2025-11-11 20:09:11 +00:00
parent 0a74bd8345
commit a2e67e3d60
No known key found for this signature in database
28 changed files with 2375 additions and 246 deletions

View file

@ -133,8 +133,10 @@ func htmlDashboard(ctx context.Context, w http.ResponseWriter, user *models.User
var lastSync time.Time
sync, err := org.FieldseekerSyncs(sm.OrderBy("created")).One(ctx, PGInstance.BobDB)
if err != nil {
respondError(w, "Failed to get syncs", err, http.StatusInternalServerError)
return
if err.Error() != "sql: no rows in result set" {
respondError(w, "Failed to get syncs", err, http.StatusInternalServerError)
return
}
} else {
lastSync = sync.Created
}