From 8da136dc346d833ea3b5df6f7045e19a9a849983 Mon Sep 17 00:00:00 2001 From: Preston Baxter Date: Fri, 24 Nov 2023 02:02:03 -0600 Subject: [PATCH] formatting --- ui/controllers/event_components.go | 1 - ui/db/models/audit.go | 6 +++--- ui/db/token_source.go | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/ui/controllers/event_components.go b/ui/controllers/event_components.go index 157d384..8469626 100644 --- a/ui/controllers/event_components.go +++ b/ui/controllers/event_components.go @@ -93,7 +93,6 @@ func actionsForUserTableData(c *gin.Context) templates.TableData { return defaultTableData(c) } - //check for filter filter, filter_exists := c.GetQuery("filter") index := 1 diff --git a/ui/db/models/audit.go b/ui/db/models/audit.go index 5352468..6eb71d8 100644 --- a/ui/db/models/audit.go +++ b/ui/db/models/audit.go @@ -18,8 +18,8 @@ type EventRecieved struct { UserId primitive.ObjectID `bson:"user_id,omitempty"` //what user is this associated too VendorName string `bson:"vendor_name,omitempty"` //Vendor name of who sent us the event VendorId string `bson:"vendor_id,omitempty"` - CorrelationId string `bson:"correlation_id,omitempty"` //list of entities effected or created from action - Type string `bson:"type,omitempty"` //type of event + CorrelationId string `bson:"correlation_id,omitempty"` //list of entities effected or created from action + Type string `bson:"type,omitempty"` //type of event } func (obj *EventRecieved) MongoId() primitive.ObjectID { @@ -48,7 +48,7 @@ type ActionTaken struct { UserId primitive.ObjectID `bson:"user_id,omitempty"` //what user is this associated too TriggeringEvent primitive.ObjectID `bson:"triggering_event,omitempty"` //what triggered this action to be taken Result string `bson:"result,omitempty"` //list of entities effected or created from action - CorrelationId string `bson:"correlation_id,omitempty"` //list of entities effected or created from action + CorrelationId string `bson:"correlation_id,omitempty"` //list of entities effected or created from action VendorName string `bson:"vendor_name,omitempty"` //Vendor name that the action was taken against } diff --git a/ui/db/token_source.go b/ui/db/token_source.go index 6843811..07d0c83 100644 --- a/ui/db/token_source.go +++ b/ui/db/token_source.go @@ -134,7 +134,7 @@ func (ts *VendorTokenSource) waitForToken(tl *models.TokenLock) error { } //We waited to long check if its refreshed and carry on - res :=col.FindOne(context.Background(), bson.M{"token_id": tl.TokenId}) + res := col.FindOne(context.Background(), bson.M{"token_id": tl.TokenId}) if res.Err() != nil { return errors.Join(TokenWaitExpired, res.Err()) }