Skip to content
Merged
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
2 changes: 1 addition & 1 deletion src/pages/api/cve/[page].ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const getServerSideCVEs = async (
}
try {
const res = await fetch(
`https://api.main.devguard.org/api/v1/vulndb/list-ids-by-creation-date/?offset=${encodeURIComponent(String(offset))}&limit=${encodeURIComponent(String(CVES_PER_SITEMAP))}`,
`${API_BASE_URL}/vulndb/list-ids-by-creation-date/?offset=${encodeURIComponent(String(offset))}&limit=${encodeURIComponent(String(CVES_PER_SITEMAP))}`,
)
if (!res.ok) {
console.error(`Upstream API error: ${res.status} ${res.statusText}`)
Expand Down
2 changes: 1 addition & 1 deletion src/pages/api/sitemap.xml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const getServerSideCVEs = async (): Promise<CVEList> => {
return { total: cachedTotal.value }
}
const res = await fetch(
`https://api.main.devguard.org/api/v1/vulndb/list-ids-by-creation-date/`,
`${API_BASE_URL}/vulndb/list-ids-by-creation-date/`,
)
if (!res.ok) {
throw new Error(`Upstream API error: ${res.status} ${res.statusText}`)
Expand Down
23 changes: 11 additions & 12 deletions src/types/api.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
export type AffectedComponent = {
id: string
Source: string
id: number
purl: string
ecosystem: string
scheme: string
type: string
name: string
namespace: string
version: string | null
semverStart?: string | null
semverEnd?: string | null
versionIntroduced?: string | null
versionFixed?: string | null
Source?: string
scheme?: string
type?: string
name?: string
namespace?: string
subpath?: string
version: string
semverStart?: string
semverEnd?: string
versionIntroduced?: string
versionFixed?: string
cves?: string
}

export type AffectedComponents = AffectedComponent[]
Loading