frontendConfigController: add a #d filter

This commit is contained in:
Alex Gleason 2023-09-03 19:18:05 -05:00
parent 7686371183
commit 5a3d112396
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 6 additions and 3 deletions

View File

@ -6,9 +6,12 @@ import { createAdminEvent } from '@/utils/web.ts';
import { Conf } from '@/config.ts';
const frontendConfigController: AppController = async (c) => {
const [event] = await eventsDB.getFilters(
[{ kinds: [30078], authors: [Conf.pubkey], limit: 1 }],
);
const [event] = await eventsDB.getFilters([{
kinds: [30078],
authors: [Conf.pubkey],
'#d': ['pub.ditto.frontendConfig'],
limit: 1,
}]);
if (event) {
const data = JSON.parse(event.content);