0.3 增加登录模块
This commit is contained in:
@@ -45,7 +45,7 @@ export async function GET(
|
||||
const { docId: id } = await params;
|
||||
|
||||
if (isConvexEnabled()) {
|
||||
const { auth, client } = getAuthedConvexClient();
|
||||
const { auth, client } = await getAuthedConvexClient();
|
||||
const mindmapId = `legacy-${id}`;
|
||||
const res = await client.query(api.mindmaps.get, {
|
||||
userId: auth.userId,
|
||||
@@ -106,7 +106,7 @@ export async function POST(
|
||||
const { docId: id } = await params;
|
||||
|
||||
if (isConvexEnabled()) {
|
||||
const { auth, client } = getAuthedConvexClient();
|
||||
const { auth, client } = await getAuthedConvexClient();
|
||||
const mindmapId = `legacy-${id}`;
|
||||
const { data } = await request.json();
|
||||
const result = await client.mutation(api.mindmaps.put, {
|
||||
@@ -161,7 +161,7 @@ export async function DELETE(
|
||||
const { docId: id } = await params;
|
||||
|
||||
if (isConvexEnabled()) {
|
||||
const { auth, client } = getAuthedConvexClient();
|
||||
const { auth, client } = await getAuthedConvexClient();
|
||||
const mindmapId = `legacy-${id}`;
|
||||
const result = await client.mutation(api.mindmaps.softDelete, {
|
||||
userId: auth.userId,
|
||||
|
||||
Reference in New Issue
Block a user