api --> controllers/api
This commit is contained in:
parent
2554379cef
commit
610ce4444a
14
src/app.ts
14
src/app.ts
|
@ -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 {
|
||||
|
|
|
@ -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')!;
|
|
@ -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(),
|
|
@ -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'));
|
Loading…
Reference in New Issue