mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-09 23:48:36 +01:00
16 lines
448 B
TypeScript
16 lines
448 B
TypeScript
|
|
import { ApiSettingsModel } from "@schema/ApiSettingsSchema";
|
|
|
|
export default defineEventHandler(async event => {
|
|
|
|
const body = await readBody(event);
|
|
|
|
const data = await getRequestDataOld(event, { allowGuests: false, allowLitlyx: false, });
|
|
if (!data) return;
|
|
|
|
const { project_id } = data;
|
|
|
|
const deletation = await ApiSettingsModel.deleteOne({ project_id, _id: body.api_id });
|
|
return { ok: deletation.acknowledged };
|
|
|
|
}); |