Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,490 changes: 924 additions & 566 deletions api-docs/openapi.json

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions schemas/registry-org/delete-registry-org-response.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://cve.mitre.org/schema/registry-org/delete-registry-org-response.json",
"type": "object",
"title": "CVE Delete Registry Org Response",
"description": "JSON Schema for a successful registry organization deletion response",
"properties": {
"message": {
"type": "string",
"description": "Confirmation that the registry organization was deleted"
}
},
"required": [
"message"
],
"additionalProperties": false
}
17 changes: 17 additions & 0 deletions schemas/registry-user/delete-registry-user-response.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://cve.mitre.org/schema/registry-user/delete-registry-user-response.json",
"type": "object",
"title": "CVE Delete Registry User Response",
"description": "JSON Schema for a successful registry user deletion response",
"properties": {
"message": {
"type": "string",
"description": "Confirmation that the registry user was deleted"
}
},
"required": [
"message"
],
"additionalProperties": false
}
5 changes: 3 additions & 2 deletions src/controller/cve-id.controller/cve-id.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ async function getFilteredCveId (req, res, next) {
const requesterOrgUUID = await authContext.getRequesterOrgUUID(req, orgRepo)

// Create map of orgUUID to shortnames and users to simplify aggregation later
const orgs = await orgRepo.getAllOrgs()
const users = await userRepo.getAllUsers()
// Only project the fields needed for the maps to avoid fetching full documents
const orgs = await orgRepo.getAllOrgs({}, { UUID: 1, short_name: 1, _id: 0 })
const users = await userRepo.getAllUsers({}, { UUID: 1, username: 1, org_UUID: 1, _id: 0 })

const orgMap = {}
const userMap = {}
Expand Down
Loading
Loading