Add account search controller, which does basically the same thing as account lookup for now

This commit is contained in:
Alex Gleason
2023-04-29 16:28:53 -05:00
parent 9e73a8e43c
commit 70f69b80f3
2 changed files with 21 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
import { type Context, cors, type Handler, Hono, type HonoEnv, type MiddlewareHandler } from '@/deps.ts';
import { accountController, accountLookupController, credentialsController } from './api/accounts.ts';
import { accountController, accountLookupController, accountSearchController, credentialsController } from './api/accounts.ts';
import { appCredentialsController, createAppController } from './api/apps.ts';
import { emptyArrayController, emptyObjectController } from './api/fallback.ts';
import homeController from './api/home.ts';
@@ -33,6 +33,7 @@ app.post('/oauth/token', createTokenController);
app.post('/oauth/revoke', emptyObjectController);
app.get('/api/v1/accounts/verify_credentials', requireAuth, credentialsController);
app.get('/api/v1/accounts/search', accountSearchController);
app.get('/api/v1/accounts/lookup', accountLookupController);
app.get('/api/v1/accounts/:id', accountController);