mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 03:19:46 +00:00
Revert "update other controllers to also use the getAuthorFallback method"
This reverts commit d5135200e8. For now let's test it with only accountsLookupController
This commit is contained in:
parent
d5135200e8
commit
46e9ae4d3d
2 changed files with 6 additions and 6 deletions
|
|
@ -4,7 +4,7 @@ import { z } from 'zod';
|
|||
|
||||
import { type AppController } from '@/app.ts';
|
||||
import { Conf } from '@/config.ts';
|
||||
import { getAuthor, getAuthorFallback, getFollowedPubkeys } from '@/queries.ts';
|
||||
import { getAuthor, getFollowedPubkeys } from '@/queries.ts';
|
||||
import { booleanParamSchema, fileSchema } from '@/schema.ts';
|
||||
import { Storages } from '@/storages.ts';
|
||||
import { uploadFile } from '@/utils/upload.ts';
|
||||
|
|
@ -79,7 +79,7 @@ const verifyCredentialsController: AppController = async (c) => {
|
|||
const accountController: AppController = async (c) => {
|
||||
const pubkey = c.req.param('pubkey');
|
||||
|
||||
const event = await getAuthorFallback(pubkey);
|
||||
const event = await getAuthor(pubkey);
|
||||
if (event) {
|
||||
return c.json(await renderAccount(event));
|
||||
} else {
|
||||
|
|
@ -244,7 +244,7 @@ const updateCredentialsController: AppController = async (c) => {
|
|||
return c.json(result.error, 422);
|
||||
}
|
||||
|
||||
const author = await getAuthorFallback(pubkey);
|
||||
const author = await getAuthor(pubkey);
|
||||
const meta = author ? n.json().pipe(n.metadata()).catch({}).parse(author.content) : {};
|
||||
|
||||
const {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import { type AppController } from '@/app.ts';
|
|||
import { Conf } from '@/config.ts';
|
||||
import { DittoDB } from '@/db/DittoDB.ts';
|
||||
import { getUnattachedMediaByIds } from '@/db/unattached-media.ts';
|
||||
import { getAncestors, getAuthorFallback, getDescendants, getEvent } from '@/queries.ts';
|
||||
import { getAncestors, getAuthor, getDescendants, getEvent } from '@/queries.ts';
|
||||
import { renderEventAccounts } from '@/views.ts';
|
||||
import { renderReblog, renderStatus } from '@/views/mastodon/statuses.ts';
|
||||
import { Storages } from '@/storages.ts';
|
||||
|
|
@ -163,7 +163,7 @@ const createStatusController: AppController = async (c) => {
|
|||
tags,
|
||||
}, c);
|
||||
|
||||
const author = await getAuthorFallback(event.pubkey);
|
||||
const author = await getAuthor(event.pubkey);
|
||||
|
||||
if (data.quote_id) {
|
||||
await hydrateEvents({
|
||||
|
|
@ -189,7 +189,7 @@ const deleteStatusController: AppController = async (c) => {
|
|||
tags: [['e', id]],
|
||||
}, c);
|
||||
|
||||
const author = await getAuthorFallback(event.pubkey);
|
||||
const author = await getAuthor(event.pubkey);
|
||||
return c.json(await renderStatus({ ...event, author }, { viewerPubkey: pubkey }));
|
||||
} else {
|
||||
return c.json({ error: 'Unauthorized' }, 403);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue