mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-11 16:28:37 +01:00
new selfhosted version
This commit is contained in:
12
dashboard/server/api/shields/addresses/list.ts
Normal file
12
dashboard/server/api/shields/addresses/list.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { AddressBlacklistModel } from "~/shared/schema/shields/AddressBlacklistSchema";
|
||||
|
||||
export default defineEventHandler(async event => {
|
||||
|
||||
const ctx = await getRequestContext(event, 'pid');
|
||||
|
||||
const { project_id } = ctx;
|
||||
|
||||
const blacklist = await AddressBlacklistModel.find({ project_id: project_id });
|
||||
|
||||
return blacklist.map(e => e.toJSON());
|
||||
});
|
||||
Reference in New Issue
Block a user