Merge branch 'fe-config' into 'develop'

frontendConfigController: add a #d filter

See merge request soapbox-pub/ditto!35
This commit is contained in:
Alex Gleason 2023-09-04 00:21:22 +00:00
commit 81ca3e79be
No known key found for this signature in database
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'; import { Conf } from '@/config.ts';
const frontendConfigController: AppController = async (c) => { const frontendConfigController: AppController = async (c) => {
const [event] = await eventsDB.getFilters( const [event] = await eventsDB.getFilters([{
[{ kinds: [30078], authors: [Conf.pubkey], limit: 1 }], kinds: [30078],
); authors: [Conf.pubkey],
'#d': ['pub.ditto.frontendConfig'],
limit: 1,
}]);
if (event) { if (event) {
const data = JSON.parse(event.content); const data = JSON.parse(event.content);