Skip to content

Commit

Permalink
fix(api): default priority
Browse files Browse the repository at this point in the history
  • Loading branch information
djabarovgeorge committed Dec 9, 2024
1 parent 07126fc commit 13fc751
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ export class ExtractDefaultValuesFromSchemaUsecase {
private getValue(value: JSONSchemaDto, key: string) {
const normalizedKey = key.toLowerCase().trim();

if (value.default != null) {
return value.default;
}

if (normalizedKey.includes('url')) {
return 'https://www.example.com/search?query=placeholder';
}
Expand All @@ -72,10 +76,6 @@ export class ExtractDefaultValuesFromSchemaUsecase {
return JSON.stringify(DEFAULT_PREVIEW_ISSUE_MESSAGE);
}

if (value.default != null) {
return value.default;
}

return PreviewIssueEnum.PREVIEW_ISSUE_REQUIRED_CONTROL_VALUE_IS_MISSING;
}
}
Expand Down

0 comments on commit 13fc751

Please sign in to comment.