EDMS/server/api/dms/folder.post.js

24 lines
563 B
JavaScript

import { PrismaClient } from "@prisma/client";
const prisma = new PrismaClient();
export default defineEventHandler( async (event) => {
console.log("This is a test for a POST request to the backend");
// const successMsg = "Hello from the backend";
const body = readBody(event);
if (!body) {
return {
status: 400,
message: "Body was not received"
}
} else {
return {
status: 200,
message: "Body received successfully",
body: body
};
}
});