'use strict';
import { apiOkResponse, apiNoContentResponse } from '../../../../meta/server/web/responses.js';
import { addLog, getLatestLogs, clearLatestLogs } from '../../../../../fd-toolbox/server/logging/latest-logs-store.js';
import { parseJsonBodyFromRequest } from '../../../../../fd-toolbox/lib/utils.js';
import { log } from '../../../../../fd-toolbox/server/logging/logger.js';

var __defProp=Object['defineProperty'],__name=(_0x2208fe,_0x1a15e9)=>__defProp(_0x2208fe,'name',{'value':_0x1a15e9,'configurable':!![]});async function logPostRoute(_0x4ae73e){const _0x13ed13=await parseJsonBodyFromRequest(_0x4ae73e);return log(_0x13ed13),addLog(_0x13ed13),apiOkResponse(getLatestLogs());}__name(logPostRoute,'logPostRoute');async function logGetRoute(){return apiOkResponse(getLatestLogs());}__name(logGetRoute,'logGetRoute');async function logDeleteRoute(){return clearLatestLogs(),apiNoContentResponse();}__name(logDeleteRoute,'logDeleteRoute');

export { logDeleteRoute, logGetRoute, logPostRoute };
