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 {AgentCardKey} from "@/components/wrappers/dashboard/agent/agent-card-key/agent-card-key";
|
||||||
import {db} from "@/db";
|
import {db} from "@/db";
|
||||||
import * as drizzleDb from "@/db";
|
import * as drizzleDb from "@/db";
|
||||||
import {and, eq} from "drizzle-orm";
|
import {eq} from "drizzle-orm";
|
||||||
import {notFound} from "next/navigation";
|
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 {ButtonDeleteAgent} from "@/components/wrappers/dashboard/agent/button-delete-agent/button-delete-agent";
|
||||||
import {capitalizeFirstLetter} from "@/utils/text";
|
import {capitalizeFirstLetter} from "@/utils/text";
|
||||||
import {Server} from "lucide-react";
|
import {Server} from "lucide-react";
|
||||||
import {generateEdgeKey} from "@/utils/edge_key";
|
import {generateEdgeKey} from "@/utils/edge_key";
|
||||||
import {getServerUrl} from "@/utils/get-server-url";
|
import {getServerUrl} from "@/utils/get-server-url";
|
||||||
|
|
||||||
|
|
||||||
export default async function RoutePage(props: PageParams<{ agentId: string }>) {
|
export default async function RoutePage(props: PageParams<{ agentId: string }>) {
|
||||||
|
|
||||||
const {agentId} = await props.params
|
const {agentId} = await props.params
|
||||||
@@ -33,7 +29,6 @@ export default async function RoutePage(props: PageParams<{ agentId: string }>)
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
if (!agent) {
|
if (!agent) {
|
||||||
notFound()
|
notFound()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import * as drizzleDb from "@/db";
|
|||||||
import {db} from "@/db";
|
import {db} from "@/db";
|
||||||
import {and, eq} from "drizzle-orm";
|
import {and, eq} from "drizzle-orm";
|
||||||
|
|
||||||
|
|
||||||
export type BodyResultRestore = {
|
export type BodyResultRestore = {
|
||||||
generatedId: string
|
generatedId: string
|
||||||
status: string
|
status: string
|
||||||
@@ -13,7 +12,6 @@ export type BodyResultRestore = {
|
|||||||
type RestorationStatus = 'waiting' | 'ongoing' | 'failed' | 'success';
|
type RestorationStatus = 'waiting' | 'ongoing' | 'failed' | 'success';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export async function POST(
|
export async function POST(
|
||||||
request: Request,
|
request: Request,
|
||||||
{params}: { params: Promise<{ agentId: string }> }
|
{params}: { params: Promise<{ agentId: string }> }
|
||||||
@@ -27,7 +25,6 @@ export async function POST(
|
|||||||
|
|
||||||
console.log(body)
|
console.log(body)
|
||||||
|
|
||||||
|
|
||||||
if (!isUuidv4(body.generatedId)) {
|
if (!isUuidv4(body.generatedId)) {
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{error: "generatedId is not a valid uuid"},
|
{error: "generatedId is not a valid uuid"},
|
||||||
@@ -71,10 +68,7 @@ export async function POST(
|
|||||||
|
|
||||||
eventEmitter.emit('modification', {update: true});
|
eventEmitter.emit('modification', {update: true});
|
||||||
|
|
||||||
|
|
||||||
return Response.json(response, {status: 200})
|
return Response.json(response, {status: 200})
|
||||||
|
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error in POST handler:', error);
|
console.error('Error in POST handler:', error);
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
|
|||||||
@@ -71,7 +71,6 @@ function checkRouteExists(pathname: string) {
|
|||||||
export const config = {
|
export const config = {
|
||||||
runtime: "nodejs",
|
runtime: "nodejs",
|
||||||
matcher: [
|
matcher: [
|
||||||
// '/api/agent/:path*',
|
|
||||||
"/api/:path*",
|
"/api/:path*",
|
||||||
"/dashboard/:path*",
|
"/dashboard/:path*",
|
||||||
"/dashboard",
|
"/dashboard",
|
||||||
|
|||||||
+2
-2
@@ -12,7 +12,7 @@ export const env = createEnv({
|
|||||||
NEXT_PUBLIC_PROJECT_DESCRIPTION: z.string().optional(),
|
NEXT_PUBLIC_PROJECT_DESCRIPTION: z.string().optional(),
|
||||||
NEXT_PUBLIC_PROJECT_URL: z.string().optional(),
|
NEXT_PUBLIC_PROJECT_URL: z.string().optional(),
|
||||||
NEXT_PUBLIC_PROJECT_VERSION: 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_PASSWORD: z.string().optional(),
|
||||||
SMTP_FROM: z.string().optional(),
|
SMTP_FROM: z.string().optional(),
|
||||||
@@ -22,7 +22,7 @@ export const env = createEnv({
|
|||||||
|
|
||||||
AUTH_GOOGLE_ID: z.string().optional(),
|
AUTH_GOOGLE_ID: z.string().optional(),
|
||||||
AUTH_GOOGLE_SECRET: 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_ENDPOINT: z.string().optional(),
|
||||||
S3_ACCESS_KEY: z.string().optional(),
|
S3_ACCESS_KEY: z.string().optional(),
|
||||||
|
|||||||
Reference in New Issue
Block a user