feat: Fluentbit investigation

This commit is contained in:
Andras Bacsai
2022-04-20 13:33:04 +02:00
parent b46566280d
commit e10b76a46b
5 changed files with 58 additions and 3 deletions

View File

@@ -1,8 +1,16 @@
import type { RequestHandler } from '@sveltejs/kit';
import * as db from '$lib/database';
export const post: RequestHandler = async (event) => {
const data = await event.request.json();
console.log(data);
for (const d of data) {
if (d.container_name) {
const { log, container_name: containerId, source } = d;
console.log(log);
// await db.prisma.applicationLogs.create({ data: { log, containerId: containerId.substr(1), source } });
}
}
return {
status: 200,
body: {}