Skip to content

Commit

Permalink
CORE-1120: fixed some problems found during proofreading
Browse files Browse the repository at this point in the history
  • Loading branch information
slr71 committed Sep 18, 2020
1 parent 4c41fad commit ba43776
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
7 changes: 2 additions & 5 deletions db/listings.go
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ func v2GetListing(tx *sql.Tx, params *V2NotificationListingParameters) ([]*model
return nil, err
}

// Sort the inner query based on the
// Sort the inner query based on the requested sort order and boundary settings.
innerSortOrder := params.SortOrder
if params.AfterTimestamp != nil {
innerSortOrder = query.SortOrderAscending
Expand Down Expand Up @@ -691,8 +691,6 @@ func GetNotification(tx *sql.Tx, user string, id string) (*model.Notification, e
Column("n.seen").
Column("n.deleted").
Column("n.outgoing_json AS message").
Column("n.id").
Column("n.time_created AS time_created").
From("notifications n").
Join("users u ON n.user_id = u.id").
Join("notification_types nt ON n.notification_type_id = nt.id").
Expand All @@ -718,10 +716,9 @@ func GetNotification(tx *sql.Tx, user string, id string) (*model.Notification, e
var notificationType string
var messageText []byte
var seen, deleted bool
var id, timeCreated string

// Fetch the data for the current row from the database.
err = rows.Scan(&notificationType, &seen, &deleted, &messageText, &id, &timeCreated)
err = rows.Scan(&notificationType, &seen, &deleted, &messageText)
if err != nil {
return nil, errors.Wrap(err, wrapMsg)
}
Expand Down
2 changes: 1 addition & 1 deletion db/misc.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func FilterMissingIDs(tx *sql.Tx, userID string, ids []string) ([]string, error)
extantIDs = append(extantIDs, id)
}

// Create a map extant IDs and use it as a set.
// Create a map of extant IDs and use it as a set.
extantIDSet := make(map[string]bool)
for _, id := range extantIDs {
extantIDSet[id] = true
Expand Down
2 changes: 1 addition & 1 deletion query/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func ValidateUUIDQueryParam(ctx echo.Context, name string, required bool) (strin
}
}

// Make sure that the query parameter format is correct if it's specified
// Make sure that the query parameter format is correct.
if value != "" {
if err := v.Var(value, "uuid_rfc4122"); err != nil {
return "", errors.Wrap(err, errMsg)
Expand Down

0 comments on commit ba43776

Please sign in to comment.