shields update

This commit is contained in:
Emily
2025-03-20 16:04:00 +01:00
parent afda29997d
commit 87c9aca5c4
34 changed files with 793 additions and 12 deletions

View File

@@ -0,0 +1,14 @@
import { AddressBlacklistModel } from "~/shared/schema/shields/AddressBlacklistSchema";
export default defineEventHandler(async event => {
const data = await getRequestData(event, [], ['OWNER']);
if (!data) return;
const body = await readBody(event);
const { address } = body;
const removal = await AddressBlacklistModel.deleteOne({ project_id: data.project_id, address });
return { ok: removal.deletedCount == 1 };
});