Update Bridge file layout

This commit is contained in:
Darren Clarke 2024-04-23 13:36:51 +02:00
parent 2c43e81436
commit b0fb643b6a
47 changed files with 2488 additions and 2087 deletions

View file

@ -1,9 +1,8 @@
import NextAuth from "next-auth"
import GoogleProvider from "next-auth/providers/google"
import { KyselyAdapter } from "@auth/kysely-adapter"
import GoogleProvider from "next-auth/providers/google";
import { KyselyAdapter } from "@auth/kysely-adapter";
import { db } from "./database";
export const authOptions = NextAuth({
export const authOptions = {
// @ts-ignore
adapter: KyselyAdapter(db),
providers: [
@ -12,4 +11,7 @@ export const authOptions = NextAuth({
clientSecret: process.env.GOOGLE_CLIENT_SECRET!,
}),
],
})
session: {
strategy: "jwt" as any,
},
};

View file

@ -53,7 +53,7 @@ export interface Database {
expires: Date;
};
WhatsAppBot: {
WhatsappBot: {
id: GeneratedAlways<string>;
name: string;
phoneNumber: string;
@ -70,7 +70,7 @@ export interface Database {
updatedAt: Date;
};
VoiceBot: {
VoiceLine: {
id: GeneratedAlways<string>;
name: string;
createdBy: string;
@ -86,6 +86,14 @@ export interface Database {
createdAt: Date;
updatedAt: Date;
};
Webhook: {
id: GeneratedAlways<string>;
name: string;
createdBy: string;
createdAt: Date;
updatedAt: Date;
};
}
export const db = new KyselyAuth<Database>({