id type fix

This commit is contained in:
headlesdev
2025-05-22 00:13:44 +02:00
parent 8e197726e5
commit d25084896d
4 changed files with 8 additions and 8 deletions

View File

@@ -3,7 +3,7 @@ import prisma from "@/app/prisma";
import { z } from "zod/v4";
const schema = z.object({
id: z.string(),
id: z.number(),
siteId: z.number(),
name: z.string().min(2),
ipv4Subnet: z.string().optional(),
@@ -17,7 +17,7 @@ export async function POST(request: NextRequest) {
try {
const network = await prisma.network.create({
data: {
siteId: Number(body.siteId),
siteId: body.siteId,
name: body.name,
ipv4Subnet: body.ipv4Subnet,
ipv6Subnet: body.ipv6Subnet,

View File

@@ -1,13 +1,13 @@
export interface Site {
id: string;
id: number;
name: string;
description?: string;
networks: Network[];
}
export interface Network {
id: string;
siteId: string;
id: number;
siteId: number;
name: string;
ipv4Subnet?: string;
ipv6Subnet?: string;