mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-10 15:58:38 +01:00
shields update
This commit is contained in:
14
dashboard/server/api/shields/ip/delete.delete.ts
Normal file
14
dashboard/server/api/shields/ip/delete.delete.ts
Normal 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 };
|
||||
});
|
||||
Reference in New Issue
Block a user