Skip to content
Merged
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
4 changes: 3 additions & 1 deletion src/services/AffectService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import type { ZodAffectType, ZodAffectCVSSType } from '@/types/';
import { beforeFetch } from './FlawService';

export async function getAffects(cveOrUuid: string) {
const field = isCveValid(cveOrUuid) ? 'cve_id' : 'flaw__uuid';
const field = isCveValid(cveOrUuid) ? 'flaw__cve_id' : 'flaw__uuid';
Copy link
Member

Choose a reason for hiding this comment

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

Wow that went totally unseen on the review, good catch!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Lucky we did! I think #590 can help to solve this potential hazard

// TODO: replace line above with line below after OSIDB-4293 is merged
// const field = isCveValid(cveOrUuid) ? 'cve_id' : 'flaw__uuid';
return osidbFetch({
method: 'get',
url: '/osidb/api/v1/affects',
Expand Down