mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
adminAccountsController: fix type error with DittoEvent
This commit is contained in:
parent
ae0ec7be7e
commit
137bd0dae0
1 changed files with 4 additions and 3 deletions
|
|
@ -2,11 +2,12 @@ import { z } from 'zod';
|
|||
|
||||
import { type AppController } from '@/app.ts';
|
||||
import { Conf } from '@/config.ts';
|
||||
import { DittoEvent } from '@/interfaces/DittoEvent.ts';
|
||||
import { booleanParamSchema } from '@/schema.ts';
|
||||
import { Storages } from '@/storages.ts';
|
||||
import { renderAdminAccount } from '@/views/mastodon/admin-accounts.ts';
|
||||
import { paginated, paginationSchema, parseBody, updateListAdminEvent } from '@/utils/api.ts';
|
||||
import { addTag } from '@/tags.ts';
|
||||
import { paginated, paginationSchema, parseBody, updateListAdminEvent } from '@/utils/api.ts';
|
||||
import { renderAdminAccount } from '@/views/mastodon/admin-accounts.ts';
|
||||
|
||||
const adminAccountQuerySchema = z.object({
|
||||
local: booleanParamSchema.optional(),
|
||||
|
|
@ -49,7 +50,7 @@ const adminAccountsController: AppController = async (c) => {
|
|||
|
||||
for (const event of events) {
|
||||
const d = event.tags.find(([name]) => name === 'd')?.[1];
|
||||
event.d_author = authors.find((author) => author.pubkey === d);
|
||||
(event as DittoEvent).d_author = authors.find((author) => author.pubkey === d);
|
||||
}
|
||||
|
||||
const accounts = await Promise.all(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue