nn-ui-v2 / build /server /chunks /_server.ts-Tr37Ptay.js
muryshev's picture
build update
7895d85
raw
history blame
879 Bytes
import { L as LogService } from './LogService-P6XVmjfT.js';
import 'fs';
import 'path';
import 'util';
import 'date-fns';
import 'mongoose';
import 'exceljs';
import './shared-server-49TKSBDM.js';
const logService = new LogService();
const POST = async ({ request }) => {
try {
const { id, score, comment } = await request.json();
await logService.logUserScore(id, score, comment);
return new Response(JSON.stringify({ message: "User score updated successfully" }), {
status: 200,
headers: { "Content-Type": "application/json" }
});
} catch (error) {
console.error("Error while recording log:", error);
return new Response(JSON.stringify({ message: "Failed to record log entry" }), {
status: 500,
headers: { "Content-Type": "application/json" }
});
}
};
export { POST };
//# sourceMappingURL=_server.ts-Tr37Ptay.js.map