mirror of
https://github.com/crocofied/CoreControl.git
synced 2025-12-29 16:14:43 +00:00
Server Hardware Information
This commit is contained in:
@@ -6,6 +6,11 @@ interface AddRequest {
|
||||
os: string;
|
||||
ip: string;
|
||||
url: string;
|
||||
cpu: string;
|
||||
gpu: string;
|
||||
ram: string;
|
||||
disk: string;
|
||||
|
||||
}
|
||||
|
||||
const prisma = new PrismaClient();
|
||||
@@ -13,7 +18,7 @@ const prisma = new PrismaClient();
|
||||
export async function POST(request: NextRequest) {
|
||||
try {
|
||||
const body: AddRequest = await request.json();
|
||||
const { name, os, ip, url } = body;
|
||||
const { name, os, ip, url, cpu, gpu, ram, disk } = body;
|
||||
|
||||
const server = await prisma.server.create({
|
||||
data: {
|
||||
@@ -21,6 +26,10 @@ export async function POST(request: NextRequest) {
|
||||
os,
|
||||
ip,
|
||||
url,
|
||||
cpu,
|
||||
gpu,
|
||||
ram,
|
||||
disk
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user