This commit is contained in:
@@ -29,7 +29,7 @@ export async function GET(
|
||||
|
||||
// Verify bot exists and user owns it
|
||||
const bot = await db.query.bots.findFirst({
|
||||
where: eq(bots.id, botId),
|
||||
where: { id: botId },
|
||||
columns: { id: true, userId: true },
|
||||
});
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ export async function GET(
|
||||
|
||||
// Verify bot exists and user owns it
|
||||
const bot = await db.query.bots.findFirst({
|
||||
where: eq(bots.id, botId),
|
||||
where: { id: botId },
|
||||
columns: { id: true, userId: true },
|
||||
});
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ export async function POST(
|
||||
|
||||
// Verify bot exists and user owns it
|
||||
const bot = await db.query.bots.findFirst({
|
||||
where: eq(bots.id, botId),
|
||||
where: { id: botId },
|
||||
columns: {
|
||||
id: true,
|
||||
userId: true,
|
||||
|
||||
@@ -41,7 +41,7 @@ export async function GET(
|
||||
|
||||
// Verify bot exists and user owns it
|
||||
const bot = await db.query.bots.findFirst({
|
||||
where: eq(bots.id, botId),
|
||||
where: { id: botId },
|
||||
columns: {
|
||||
id: true,
|
||||
userId: true,
|
||||
|
||||
@@ -31,7 +31,7 @@ export async function POST(
|
||||
|
||||
// Verify bot exists
|
||||
const bot = await db.query.bots.findFirst({
|
||||
where: eq(bots.id, botId),
|
||||
where: { id: botId },
|
||||
columns: { id: true, userId: true },
|
||||
});
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ export async function POST(
|
||||
|
||||
// Verify bot exists
|
||||
const bot = await db.query.bots.findFirst({
|
||||
where: eq(bots.id, botId),
|
||||
where: { id: botId },
|
||||
columns: { id: true, userId: true },
|
||||
});
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ export async function POST(request: Request) {
|
||||
let botAvatarUrl: string | null | undefined = data.avatarUrl;
|
||||
if (!botAvatarUrl && storageSession) {
|
||||
try {
|
||||
const nodeDomain = process.env.NEXT_PUBLIC_NODE_DOMAIN || 'localhost:3000';
|
||||
const nodeDomain = process.env.NEXT_PUBLIC_NODE_DOMAIN || 'localhost:43821';
|
||||
const botHandle = `${data.handle.toLowerCase()}@${nodeDomain}`;
|
||||
|
||||
botAvatarUrl = await generateAndUploadAvatarToUserStorage(
|
||||
|
||||
Reference in New Issue
Block a user