mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-05-05 23:40:57 +00:00
added way to save content and vectorize them. also refactored code and added a bypass to browser rendering
This commit is contained in:
parent
84455ad5d5
commit
4daee14a82
31 changed files with 479 additions and 106 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import { db } from "@/app/helpers/server/db";
|
||||
import { db } from "@/server/db";
|
||||
import { and, eq, ne, sql } from "drizzle-orm";
|
||||
import { sessions, storedContent, users } from "@/app/helpers/server/db/schema";
|
||||
import { sessions, storedContent, users } from "@/server/db/schema";
|
||||
import { type NextRequest, NextResponse } from "next/server";
|
||||
import { ensureAuth } from "../ensureAuth";
|
||||
|
||||
|
|
@ -20,7 +20,7 @@ export async function GET(req: NextRequest) {
|
|||
.from(storedContent)
|
||||
.where(
|
||||
and(
|
||||
eq(storedContent.user, session.user.id),
|
||||
eq(storedContent.userId, session.user.id),
|
||||
eq(storedContent.type, "twitter-bookmark"),
|
||||
),
|
||||
);
|
||||
|
|
@ -32,7 +32,7 @@ export async function GET(req: NextRequest) {
|
|||
.from(storedContent)
|
||||
.where(
|
||||
and(
|
||||
eq(storedContent.user, session.user.id),
|
||||
eq(storedContent.userId, session.user.id),
|
||||
ne(storedContent.type, "twitter-bookmark"),
|
||||
),
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue