Skip to content

Commit

Permalink
Clean up API imports after refactor (#256)
Browse files Browse the repository at this point in the history
no refs
  • Loading branch information
mike182uk authored Jan 10, 2025
1 parent 6bbf66d commit 0b9f804
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
7 changes: 5 additions & 2 deletions src/http/api/activities.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import type { Context } from 'hono';

import { type HonoContextVariables, fedify } from '../../app';
import { getActivityMeta } from '../../db';
import { getActivityChildren, getActivityParents } from '../../db';
import {
getActivityChildren,
getActivityMeta,
getActivityParents,
} from '../../db';
import { buildActivity } from '../../helpers/activitypub/activity';
import { isUri } from '../../helpers/uri';
import { spanWrapper } from '../../instrumentation';
Expand Down
9 changes: 4 additions & 5 deletions src/http/api/webhooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import type { Context } from 'hono';
import { v4 as uuidv4 } from 'uuid';
import { z } from 'zod';

import { updateSiteActor } from 'helpers/activitypub/actor';
import { getSiteSettings } from 'helpers/ghost';
import { type ContextData, type HonoContextVariables, fedify } from '../../app';
import { ACTOR_DEFAULT_HANDLE } from '../../constants';
import { updateSiteActor } from '../../helpers/activitypub/actor';
import { getSiteSettings } from '../../helpers/ghost';
import { toURL } from '../../helpers/uri';
import { addToList } from '../../kv-helpers';

Expand Down Expand Up @@ -128,7 +128,7 @@ export async function handleWebhookPostPublished(
}
return new Response(JSON.stringify({}), {
headers: {
'Content-Type': 'application/activity+json',
'Content-Type': 'application/json',
},
status: 200,
});
Expand All @@ -143,7 +143,6 @@ export async function handleWebhookSiteChanged(
ctx: Context<{ Variables: HonoContextVariables }>,
) {
try {
const host = ctx.req.header('host') || '';
const db = ctx.get('db');
const globaldb = ctx.get('globaldb');
const logger = ctx.get('logger');
Expand All @@ -163,7 +162,7 @@ export async function handleWebhookSiteChanged(

return new Response(JSON.stringify({}), {
headers: {
'Content-Type': 'application/activity+json',
'Content-Type': 'application/json',
},
status: 200,
});
Expand Down

0 comments on commit 0b9f804

Please sign in to comment.