mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-11 16:28:37 +01:00
18 lines
382 B
TypeScript
18 lines
382 B
TypeScript
|
|
import { DomainWhitelistModel } from "~/shared/schema/shields/DomainWhitelistSchema";
|
|
|
|
export default defineEventHandler(async event => {
|
|
|
|
const ctx = await getRequestContext(event, 'pid');
|
|
|
|
const { project_id } = ctx;
|
|
|
|
const whitelist = await DomainWhitelistModel.findOne({
|
|
project_id
|
|
});
|
|
|
|
if (!whitelist) return [];
|
|
|
|
return whitelist.domains;
|
|
|
|
}); |