feat: add code and text block types (#609)
This commit is contained in:
parent
3df0fd4c0f
commit
9778631d6f
27 changed files with 1754 additions and 290 deletions
|
|
@ -16,6 +16,7 @@ import {
|
|||
message,
|
||||
vote,
|
||||
} from './schema';
|
||||
import { BlockKind } from '@/components/block';
|
||||
|
||||
// Optionally, if not using email/pass login, you can
|
||||
// use the Drizzle adapter for Auth.js / NextAuth
|
||||
|
|
@ -169,11 +170,13 @@ export async function getVotesByChatId({ id }: { id: string }) {
|
|||
export async function saveDocument({
|
||||
id,
|
||||
title,
|
||||
kind,
|
||||
content,
|
||||
userId,
|
||||
}: {
|
||||
id: string;
|
||||
title: string;
|
||||
kind: BlockKind;
|
||||
content: string;
|
||||
userId: string;
|
||||
}) {
|
||||
|
|
@ -181,6 +184,7 @@ export async function saveDocument({
|
|||
return await db.insert(document).values({
|
||||
id,
|
||||
title,
|
||||
kind,
|
||||
content,
|
||||
userId,
|
||||
createdAt: new Date(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue