Skip to content

Commit e710a3e

Browse files
Remove redundant check
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 0f89997 commit e710a3e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/utils/imageUtils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ export async function deleteImage(
7070
supabase: SupabaseClient,
7171
fileUrl: string
7272
): Promise<void> {
73+
async function deleteImage(fileUrl: string) {
7374
const { filePath } = extractFilePathAndNameFromUrl(fileUrl)
74-
if (!filePath) {
75-
throw new ApiError('Invalid file URL', 400)
76-
}
75+
// ...rest of the deletion logic...
76+
}
7777
const { error: deleteError } = await supabase
7878
.storage
7979
.from('images')

0 commit comments

Comments
 (0)