mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-13 08:48:38 +01:00
new selfhosted version
This commit is contained in:
9
dashboard/server/api/shields/bots/options.ts
Normal file
9
dashboard/server/api/shields/bots/options.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { BotTrafficOptionModel } from "~/shared/schema/shields/BotTrafficOptionSchema";
|
||||
|
||||
export default defineEventHandler(async event => {
|
||||
const ctx = await getRequestContext(event, 'pid');
|
||||
const { project_id } = ctx;
|
||||
const result = await BotTrafficOptionModel.findOne({ project_id });
|
||||
if (!result) return { block: false };
|
||||
return { block: result.block }
|
||||
});
|
||||
Reference in New Issue
Block a user