fix(auth): migrate from next-auth to better-auth (#1453)
This commit is contained in:
parent
453f5bb3e6
commit
b4f595a68c
40 changed files with 668 additions and 390 deletions
|
|
@ -1,9 +1,9 @@
|
|||
import type { UIMessageStreamWriter } from "ai";
|
||||
import type { Session } from "next-auth";
|
||||
import { codeDocumentHandler } from "@/artifacts/code/server";
|
||||
import { sheetDocumentHandler } from "@/artifacts/sheet/server";
|
||||
import { textDocumentHandler } from "@/artifacts/text/server";
|
||||
import type { ArtifactKind } from "@/components/artifact";
|
||||
import type { AuthSession } from "@/lib/auth";
|
||||
import { saveDocument } from "../db/queries";
|
||||
import type { Document } from "../db/schema";
|
||||
import type { ChatMessage } from "../types";
|
||||
|
|
@ -20,14 +20,14 @@ export type CreateDocumentCallbackProps = {
|
|||
id: string;
|
||||
title: string;
|
||||
dataStream: UIMessageStreamWriter<ChatMessage>;
|
||||
session: Session;
|
||||
session: NonNullable<AuthSession>;
|
||||
};
|
||||
|
||||
export type UpdateDocumentCallbackProps = {
|
||||
document: Document;
|
||||
description: string;
|
||||
dataStream: UIMessageStreamWriter<ChatMessage>;
|
||||
session: Session;
|
||||
session: NonNullable<AuthSession>;
|
||||
};
|
||||
|
||||
export type DocumentHandler<T = ArtifactKind> = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue