diff --git a/lib/notion/getPostBlocks.js b/lib/notion/getPostBlocks.js index 3c08f0bd..19ca3b51 100644 --- a/lib/notion/getPostBlocks.js +++ b/lib/notion/getPostBlocks.js @@ -1,5 +1,9 @@ import BLOG from '@/blog.config' -import { getDataFromCache, getOrSetDataWithCache, setDataToCache } from '@/lib/cache/cache_manager' +import { + getDataFromCache, + getOrSetDataWithCache, + setDataToCache +} from '@/lib/cache/cache_manager' import { deepClone, delay } from '../utils' import notionAPI from '@/lib/notion/getNotionAPI' @@ -139,8 +143,7 @@ function convertNotionBlocksToPost(id, blockMap, slice) { b?.value?.type === 'pdf' || b?.value?.type === 'video' || b?.value?.type === 'audio') && - b?.value?.properties?.source?.[0][0] && - b?.value?.properties?.source?.[0][0].indexOf('amazonaws.com') > 0 + b?.value?.properties?.source?.[0][0] ) { const oldUrl = b?.value?.properties?.source?.[0][0] const newUrl = `https://notion.so/signed/${encodeURIComponent(oldUrl)}?table=block&id=${b?.value?.id}`