Closed knolleary closed 3 days ago
Attention: Patch coverage is 98.21429%
with 1 line
in your changes missing coverage. Please review.
Project coverage is 78.84%. Comparing base (
becdc3e
) to head (81900e9
). Report is 6 commits behind head on main.
Files with missing lines | Patch % | Lines |
---|---|---|
forge/db/models/Device.js | 88.88% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
🚨 Try these New Features:
Closes #4756
Description
Adds
GET /api/v1/search
as a general search endpoint for a user's resources.For this iteration, it searches Applications, Instances and Devices in a given team using their
name
property.The endpoint accepts two query params:
team
: the team id to search within. This is a required property for this iteration - but will allow us to enable account-wide search for a user in the future if so needed.query
: string search term.I have reused existing model find functions by adding an optional query parameter.
The response object looks like this. Each object in the
results
array has anobject
property to identify the type of thing it is. It then contains properties for that thing largely consistent with existing 'summary' views. This should give us enough info to render the search results sensibly.For instances, there are a couple more bits to look at adding around dashboard usage and current state - but this should be good enough to get started.