refactor code

This commit is contained in:
Max
2025-05-24 16:43:09 +03:00
parent ddcf27b022
commit 6b5ae7bce1

View File

@@ -7,7 +7,6 @@ async function initSupabaseClient() {
const supabaseUrl = await getSupabaseUrl();
const supabaseAnonKey = await getSupabaseKey();
supabase = createClient(supabaseUrl, supabaseAnonKey);
return supabase;
}
function getSupabaseClient() {
@@ -16,7 +15,7 @@ function getSupabaseClient() {
}
return supabase;
}
// POST /refresh-supabase-client
router.post('/refresh-supabase-client', async (req, res) => {
try {
@@ -31,7 +30,7 @@ try {
(async () => {
await initSupabaseClient();
})();
module.exports = {
getSupabaseClient,
};