refactor: remove supabase auth

This commit is contained in:
Henry
2025-05-05 15:16:30 +01:00
parent 091fea6f38
commit b6daaa41de
42 changed files with 319 additions and 1591 deletions

View File

@@ -1,8 +1,6 @@
import type { SupabaseClient } from "@supabase/supabase-js";
import { and, asc, desc, eq, gt, inArray, isNull, sql } from "drizzle-orm";
import type { dbClient } from "@kan/db/client";
import type { Database } from "@kan/db/types/database.types";
import {
cardActivities,
cards,

View File

@@ -1,8 +1,6 @@
import type { SupabaseClient } from "@supabase/supabase-js";
import { and, desc, eq, gt, isNull, sql } from "drizzle-orm";
import type { dbClient } from "@kan/db/client";
import type { Database } from "@kan/db/types/database.types";
import { lists } from "@kan/db/schema";
import { generateUID } from "@kan/shared/utils";

View File

@@ -47,18 +47,20 @@ export const create = async (
export const update = async (
db: dbClient,
userId: string,
updates: { image?: string; name?: string },
updates: { image?: string; name?: string; stripeCustomerId?: string },
) => {
const [result] = await db
.update(users)
.set({
name: updates.name,
image: updates.image,
stripeCustomerId: updates.stripeCustomerId,
})
.where(eq(users.id, userId))
.returning({
name: users.name,
image: users.image,
stripeCustomerId: users.stripeCustomerId,
});
return result;