'use strict';
import { isDemo } from '../../../fd-toolbox/lib/environments.js';
import { apiBadRequestResponse, apiOkResponse } from '../../meta/server/web/responses.js';
import { resetDemoDataInExistingDb } from '../db/db.js';

var __defProp=Object['defineProperty'],__name=(_0x5707cc,_0x164265)=>__defProp(_0x5707cc,'name',{'value':_0x164265,'configurable':!![]});const responseResetDataMessages={'success':'Database\x20reset\x20successfully','notAllowed':'Not\x20allowed\x20in\x20this\x20environment'};async function resetDataPostRoute(){if(!isDemo())return apiBadRequestResponse({'message':responseResetDataMessages['notAllowed']});return await resetDemoDataInExistingDb(),apiOkResponse({'message':responseResetDataMessages['success']});}__name(resetDataPostRoute,'resetDataPostRoute');

export { resetDataPostRoute };
