mirror of
https://github.com/willchen96/mike.git
synced 2026-07-04 22:02:12 +02:00
Sync deployment and project page fixes
This commit is contained in:
parent
91d0c2a089
commit
f39f175273
13 changed files with 1444 additions and 1315 deletions
|
|
@ -1,16 +1,7 @@
|
|||
import { Router } from "express";
|
||||
import { createClient } from "@supabase/supabase-js";
|
||||
import { requireAuth } from "../middleware/auth";
|
||||
import { createServerSupabase } from "../lib/supabase";
|
||||
|
||||
function getAdminClient() {
|
||||
return createClient(
|
||||
process.env.NEXT_PUBLIC_SUPABASE_URL ?? "",
|
||||
process.env.SUPABASE_SECRET_KEY ?? "",
|
||||
{ auth: { autoRefreshToken: false, persistSession: false } },
|
||||
);
|
||||
}
|
||||
|
||||
export const workflowsRouter = Router();
|
||||
|
||||
type Db = ReturnType<typeof createServerSupabase>;
|
||||
|
|
@ -113,7 +104,7 @@ workflowsRouter.get("/", requireAuth, async (req, res) => {
|
|||
: { data: [] };
|
||||
|
||||
// Fetch sharer emails via admin client
|
||||
const admin = getAdminClient();
|
||||
const admin = createServerSupabase();
|
||||
const { data: authData } = await admin.auth.admin.listUsers({ perPage: 1000 });
|
||||
const authUsers = authData?.users ?? [];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue