Files
litlyx/dashboard/server/api/shields/countries/list.ts
2025-03-24 18:54:15 +01:00

8 lines
359 B
TypeScript

import { CountryBlacklistModel } from "~/shared/schema/shields/CountryBlacklistSchema";
export default defineEventHandler(async event => {
const data = await getRequestData(event, [], ['OWNER']);
if (!data) return;
const blacklist = await CountryBlacklistModel.find({ project_id: data.project_id });
return blacklist.map(e => e.toJSON());
});