mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
Ready for 1.1.3-rc.2
This commit is contained in:
@@ -10,18 +10,14 @@ import {DatabaseCard} from "@/components/wrappers/dashboard/projects/project-car
|
||||
import {AgentCardKey} from "@/components/wrappers/dashboard/agent/agent-card-key/agent-card-key";
|
||||
import {db} from "@/db";
|
||||
import * as drizzleDb from "@/db";
|
||||
import {and, eq} from "drizzle-orm";
|
||||
import {eq} from "drizzle-orm";
|
||||
import {notFound} from "next/navigation";
|
||||
import {
|
||||
ButtonDeleteProject
|
||||
} from "@/components/wrappers/dashboard/projects/button-delete-project/button-delete-project";
|
||||
import {ButtonDeleteAgent} from "@/components/wrappers/dashboard/agent/button-delete-agent/button-delete-agent";
|
||||
import {capitalizeFirstLetter} from "@/utils/text";
|
||||
import {Server} from "lucide-react";
|
||||
import {generateEdgeKey} from "@/utils/edge_key";
|
||||
import {getServerUrl} from "@/utils/get-server-url";
|
||||
|
||||
|
||||
export default async function RoutePage(props: PageParams<{ agentId: string }>) {
|
||||
|
||||
const {agentId} = await props.params
|
||||
@@ -33,7 +29,6 @@ export default async function RoutePage(props: PageParams<{ agentId: string }>)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
if (!agent) {
|
||||
notFound()
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ import * as drizzleDb from "@/db";
|
||||
import {db} from "@/db";
|
||||
import {and, eq} from "drizzle-orm";
|
||||
|
||||
|
||||
export type BodyResultRestore = {
|
||||
generatedId: string
|
||||
status: string
|
||||
@@ -13,7 +12,6 @@ export type BodyResultRestore = {
|
||||
type RestorationStatus = 'waiting' | 'ongoing' | 'failed' | 'success';
|
||||
|
||||
|
||||
|
||||
export async function POST(
|
||||
request: Request,
|
||||
{params}: { params: Promise<{ agentId: string }> }
|
||||
@@ -27,7 +25,6 @@ export async function POST(
|
||||
|
||||
console.log(body)
|
||||
|
||||
|
||||
if (!isUuidv4(body.generatedId)) {
|
||||
return NextResponse.json(
|
||||
{error: "generatedId is not a valid uuid"},
|
||||
@@ -71,10 +68,7 @@ export async function POST(
|
||||
|
||||
eventEmitter.emit('modification', {update: true});
|
||||
|
||||
|
||||
return Response.json(response, {status: 200})
|
||||
|
||||
|
||||
} catch (error) {
|
||||
console.error('Error in POST handler:', error);
|
||||
return NextResponse.json(
|
||||
|
||||
@@ -71,7 +71,6 @@ function checkRouteExists(pathname: string) {
|
||||
export const config = {
|
||||
runtime: "nodejs",
|
||||
matcher: [
|
||||
// '/api/agent/:path*',
|
||||
"/api/:path*",
|
||||
"/dashboard/:path*",
|
||||
"/dashboard",
|
||||
|
||||
+2
-2
@@ -12,7 +12,7 @@ export const env = createEnv({
|
||||
NEXT_PUBLIC_PROJECT_DESCRIPTION: z.string().optional(),
|
||||
NEXT_PUBLIC_PROJECT_URL: z.string().optional(),
|
||||
NEXT_PUBLIC_PROJECT_VERSION: z.string().optional(),
|
||||
PROJECT_SECRET: z.string(),
|
||||
PROJECT_SECRET: z.string().optional(),
|
||||
|
||||
SMTP_PASSWORD: z.string().optional(),
|
||||
SMTP_FROM: z.string().optional(),
|
||||
@@ -22,7 +22,7 @@ export const env = createEnv({
|
||||
|
||||
AUTH_GOOGLE_ID: z.string().optional(),
|
||||
AUTH_GOOGLE_SECRET: z.string().optional(),
|
||||
NEXT_PUBLIC_GOOGLE_AUTH: z.boolean().default(false).optional(),
|
||||
NEXT_PUBLIC_GOOGLE_AUTH: z.boolean().default(false).optional(),
|
||||
|
||||
S3_ENDPOINT: z.string().optional(),
|
||||
S3_ACCESS_KEY: z.string().optional(),
|
||||
|
||||
Reference in New Issue
Block a user