From 702a9225cfd0fceb2b6d195f302407fd180909e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=87=E1=85=A1=E1=86=A8=E1=84=80=E1=85=A5=E1=86=AB?= =?UTF-8?q?=E1=84=80=E1=85=B2?= Date: Wed, 26 Jun 2024 17:25:05 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=EC=9A=94=EC=B2=AD=20=ED=9B=84=20?= =?UTF-8?q?=EB=B0=9B=EC=9D=80=20=EC=83=81=EC=88=98=20=EB=8D=B0=EC=9D=B4?= =?UTF-8?q?=ED=84=B0=EB=A5=BC=20=EB=B3=80=EA=B2=BD=EB=90=98=EC=A7=80=20?= =?UTF-8?q?=EC=95=8A=EB=8F=84=EB=A1=9D=20let=20=EC=97=90=EC=84=9C=20const?= =?UTF-8?q?=20=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/service/contents.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/service/contents.js b/src/service/contents.js index e5bf068..ce61fe7 100644 --- a/src/service/contents.js +++ b/src/service/contents.js @@ -5,7 +5,7 @@ const TABLE_NAME = import.meta.env.VITE_TABLE_NAME; const BUCKET_NAME = import.meta.env.VITE_BUCKET_NAME; export const getContents = async () => { - let { data: blog, error } = await supabase.from(TABLE_NAME).select("*"); + const { data: blog, error } = await supabase.from(TABLE_NAME).select("*"); if (error) throw new Error(error.message); return blog; }; @@ -13,7 +13,7 @@ export const getContents = async () => { export const getImageUrl = async (contentId) => { const directory = `content/${contentId}`; - let { data: image, error } = supabase.storage + const { data: image, error } = supabase.storage .from(BUCKET_NAME) .getPublicUrl(directory); if (error) throw new Error(error.message); @@ -53,7 +53,7 @@ const uploadImage = async (file, id) => { }; export const getContentById = async (id) => { - let { data, error } = await supabase + const { data, error } = await supabase .from(TABLE_NAME) .select("*") .eq("id", id);