api --> controllers/api

This commit is contained in:
Alex Gleason 2023-04-30 14:45:30 -05:00
parent 2554379cef
commit 610ce4444a
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
8 changed files with 17 additions and 21 deletions

View File

@ -6,13 +6,13 @@ import {
accountSearchController,
credentialsController,
relationshipsController,
} from './api/accounts.ts';
import { appCredentialsController, createAppController } from './api/apps.ts';
import { emptyArrayController, emptyObjectController } from './api/fallback.ts';
import { homeController } from './api/timelines.ts';
import instanceController from './api/instance.ts';
import { createTokenController, oauthAuthorizeController, oauthController } from './api/oauth.ts';
import { contextController, createStatusController, statusController } from './api/statuses.ts';
} from './controllers/api/accounts.ts';
import { appCredentialsController, createAppController } from './controllers/api/apps.ts';
import { emptyArrayController, emptyObjectController } from './controllers/api/fallback.ts';
import { homeController } from './controllers/api/timelines.ts';
import instanceController from './controllers/api/instance.ts';
import { createTokenController, oauthAuthorizeController, oauthController } from './controllers/api/oauth.ts';
import { contextController, createStatusController, statusController } from './controllers/api/statuses.ts';
import { requireAuth, setAuth } from './middleware/auth.ts';
interface AppEnv extends HonoEnv {

View File

@ -1,11 +1,10 @@
import { type AppController } from '@/app.ts';
import { nip05 } from '@/deps.ts';
import { getAuthor } from '@/client.ts';
import { toAccount } from '@/transmute.ts';
import { bech32ToPubkey } from '@/utils.ts';
import { getAuthor } from '../client.ts';
import { toAccount } from '../transmute.ts';
import { bech32ToPubkey } from '../utils.ts';
import type { Event } from '../event.ts';
import type { Event } from '@/event.ts';
const credentialsController: AppController = async (c) => {
const pubkey = c.get('pubkey')!;

View File

@ -1,11 +1,10 @@
import { type AppContext, AppController } from '@/app.ts';
import { getAncestors, getDescendants, getEvent } from '@/client.ts';
import { validator, z } from '@/deps.ts';
import { type Event } from '@/event.ts';
import publish from '@/publisher.ts';
import { signEvent } from '@/sign.ts';
import { getAncestors, getDescendants, getEvent } from '../client.ts';
import publish from '../publisher.ts';
import { toStatus } from '../transmute.ts';
import { toStatus } from '@/transmute.ts';
const createStatusSchema = z.object({
status: z.string(),

View File

@ -1,10 +1,8 @@
import { type AppController } from '@/app.ts';
import { getFeed, getFollows } from '@/client.ts';
import { LOCAL_DOMAIN } from '@/config.ts';
import { z } from '@/deps.ts';
import { getFeed, getFollows } from '../client.ts';
import { toStatus } from '../transmute.ts';
import { LOCAL_DOMAIN } from '../config.ts';
import { toStatus } from '@/transmute.ts';
const homeController: AppController = async (c) => {
const since = paramSchema.parse(c.req.query('since'));