mirror of
https://github.com/crocofied/CoreControl.git
synced 2025-12-29 16:14:43 +00:00
id type fix
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user