mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 00:49:03 +00:00
Website: Update query-detail page view action. (#25717)
Closes: #25716 Changes: - updated `view-query-detail` to return a `notFound` response if the slug of a vital is provided.
This commit is contained in:
parent
11d9f56b95
commit
e81f0f82f2
1 changed files with 1 additions and 1 deletions
2
website/api/controllers/view-query-detail.js
vendored
2
website/api/controllers/view-query-detail.js
vendored
|
|
@ -35,7 +35,7 @@ module.exports = {
|
|||
|
||||
// Serve appropriate content for query.
|
||||
// > Inspired by https://github.com/sailshq/sailsjs.com/blob/b53c6e6a90c9afdf89e5cae00b9c9dd3f391b0e7/api/controllers/documentation/view-documentation.js
|
||||
let query = _.find(sails.config.builtStaticContent.queries, { slug: slug });
|
||||
let query = _.find(sails.config.builtStaticContent.queries, {kind: 'query', slug: slug });
|
||||
if (!query) {
|
||||
// If we didn't find a query matching this slug, check to see if there is a policy with a matching slug.
|
||||
// Note: We do this because policies used to be on /queries/* pages. This way, all old URLs that policies used to live at will still bring users to the correct page.
|
||||
|
|
|
|||
Loading…
Reference in a new issue