mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
frontendConfigController: add a #d filter
This commit is contained in:
parent
7686371183
commit
5a3d112396
1 changed files with 6 additions and 3 deletions
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue