From ab55f3d28604801440a128114fa0848695e98f2a Mon Sep 17 00:00:00 2001 From: 1emu Date: Thu, 19 Dec 2024 12:03:42 -0300 Subject: [PATCH] refactor: remove unused validation --- src/utils/validations.ts | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/utils/validations.ts b/src/utils/validations.ts index ada482352..3b3709a75 100644 --- a/src/utils/validations.ts +++ b/src/utils/validations.ts @@ -255,23 +255,6 @@ export async function isValidImage(imageUrl: string) { }) } -export async function valdidateImagesUrls(proposalSection: string) { - const imageUrls = extractImageUrls(proposalSection) - - const errors: string[] = [] - for (const imageUrl of imageUrls) { - const isValid = await isValidImage(imageUrl) - if (!isValid) { - errors.push(imageUrl) - } - } - - return { - isValid: errors.length === 0, - errors, - } -} - export function extractImageUrls(markdown: string): string[] { const imageRegex = /!\[.*?\]\((.*?)\)|\[.*?\]:\s*(.*?)(?:\s|$)/g const urls: string[] = []