Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.

Add the productionOnly query parameter to search API #383

Merged
merged 5 commits into from
Apr 10, 2022

Conversation

noahingh
Copy link
Member

@noahingh noahingh commented Mar 14, 2022

The productionOnly parameter is added to the API to retrieve only the deployments for the production environment. Related #382

@noahingh noahingh added component: server This issue or pull request is related to the feature of the server-side enhancement New feature or request labels Mar 14, 2022
Comment on lines +44 to +49
s.Join(p).OnP(
sql.And(
sql.ColumnsEQ(p.C(perm.FieldRepoID), s.C(deployment.FieldRepoID)),
sql.EQ(p.C(perm.FieldUserID), u.ID),
),
)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bugfix:

-- Returns deployments under the accessible repositories
JOIN 
  ON `perms`.`repo_id` = `deployments`.`repo_id`
  AND `perms`.`user_id` = ?

Comment on lines +113 to +116
// Or search deployments that were created between the start time and the end time.
index.Fields("created_at", "status"),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switch the fields to optimize the index

@noahingh noahingh added this to the v0.7 milestone Mar 15, 2022
@noahingh noahingh force-pushed the enhance-search-api branch from 6c7767e to 1e18919 Compare April 10, 2022 05:47
Comment on lines +105 to +106
From: from,
To: to,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move the way converting the format into the store package.

@noahingh noahingh merged commit 21de3b2 into main Apr 10, 2022
@noahingh noahingh deleted the enhance-search-api branch April 10, 2022 05:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
component: server This issue or pull request is related to the feature of the server-side enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant